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

Incorrect image format returned (via experimental astro:assets) #6610

Closed
1 task
tpiros opened this issue Mar 21, 2023 · 2 comments
Closed
1 task

Incorrect image format returned (via experimental astro:assets) #6610

tpiros opened this issue Mar 21, 2023 · 2 comments

Comments

@tpiros
Copy link

tpiros commented Mar 21, 2023

What version of astro are you using?

2.1.3

Are you using an SSR adapter? If so, which one?

None

What package manager are you using?

npm

What operating system are you using?

Mac

What browser are you using?

Chrome

Describe the Bug

As per the docs:

You can optionally state the image file type to be used. The default file format used is webp.

However, given this code:

---
import spain from '~/assets/spain.jpeg';
import { Image } from 'astro:assets';
---
<Image src={spain} width={600} alt="Some Text" />

I always end up receiving jpg not webp so I'm slightly confused.

As a side note it doesn't matter if I have squoosh explicitly specified in astro.config.mjs or not.

Link to Minimal Reproducible Example

n/a

Participation

  • I am willing to submit a pull request for this issue.
@Princesseuh
Copy link
Member

This was fixed in #6555. Just hasn't been released yet, we'll do a release shortly. Sorry for the inconvenience!

Fwiw, the file format is correct, it's just the file extension that's wrong

@tpiros
Copy link
Author

tpiros commented Mar 21, 2023

Thanks for the update. I checked the headers and the images also come back as image/jpeg - not sure if that's driven by the extension or not by the browser though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants