Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoImageMetadata does not log the image path #8665

Closed
1 task done
nolanlawson opened this issue Sep 26, 2023 · 0 comments · Fixed by #8666
Closed
1 task done

NoImageMetadata does not log the image path #8665

nolanlawson opened this issue Sep 26, 2023 · 0 comments · Fixed by #8666
Labels
needs triage Issue needs to be triaged

Comments

@nolanlawson
Copy link
Contributor

nolanlawson commented Sep 26, 2023

Astro Info

Astro                    v3.1.2
Node                     v20.7.0
System                   Linux (x64)
Package Manager          npm
Output                   static
Adapter                  none
Integrations             none

If this issue only occurs in one browser, which browser is a problem?

No response

Describe the Bug

When an image fails due to no metadata, you get the error message:

NoImageMetadata: Could not process image metadata for `${imagePath}`.
     at imageMetadata (file:///.../node_modules/astro/dist/assets/utils/metadata.js:6:11)
[...
   loc: { file: 'src/pages/[...slug].astro' },
   title: 'Could not process image metadata.',
   hint: 'This is often caused by a corrupted or malformed image. Re-exporting the image from your image editor may fix this issue.',
   frame: undefined,
   type: 'AstroError'
 }

What's the expected result?

I think the intention is to print the path of the image, but instead it's not printed due to this line:

`Could not process image metadata${imagePath ? ' for `${imagePath}`' : ''}.`,

Link to Minimal Reproducible Example

N/A

Participation

  • I am willing to submit a pull request for this issue.
@github-actions github-actions bot added the needs triage Issue needs to be triaged label Sep 26, 2023
nolanlawson added a commit to nolanlawson/astro that referenced this issue Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage Issue needs to be triaged
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant