Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed May 2, 2023
1 parent 5006cab commit 47aaa4f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions packages/next-swc/crates/next-core/src/next_image/module.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ pub enum BlurPlaceholderMode {
/// Do not generate a blur placeholder at all.
None,
/// Generate a blur placeholder as data url and embed it directly into the
/// javascript code. This need to compute the blur placeholder eagerly and
/// JavaScript code. This needs to compute the blur placeholder eagerly and
/// has a higher computation overhead.
DataUrl,
/// Avoid generating a blur placeholder eagerly and uses `/_next/image`
/// instead to compute one on demand. This changes the UX slightly (blur
/// placeholder is shown later than it should be) and should
/// only be used for development.
NextImage,
NextImageUrl,
}

/// Module type that analyzes images and offers some meta information like
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ impl Asset for StructuredImageSourceAsset {
writeln!(result, "import src from \"IMAGE\";",)?;
let blur_options = blur_options();
match self.blur_placeholder_mode {
BlurPlaceholderMode::NextImage => {
BlurPlaceholderMode::NextImageUrl => {
let info = get_meta_data(self.image.ident(), content, None).await?;
let width = info.width;
let height = info.height;
Expand Down

0 comments on commit 47aaa4f

Please sign in to comment.