#assets:image generating corrupt image when setting a size on a non webp file
1 messages Β· Page 1 of 1 (latest)
hi ronnie π is this issue happening to a specific set of images your project is using? If you use a cdn for the same images, does that works out?
I am using local images, and it is happening to all jpg and png images
can you share your project info by sharing results from npm run astro info
Astro v4.1.1
Node v20.10.0
System Linux (x64)
Package Manager npm
Output static
Adapter none
Integrations astro-icon
I will suggest upgrading it using npx @astrojs/upgrade (in a different branch to save your work) and check if that solves the Issue
Are you using the default image service?
I will try that, thank you.
Yes, I have not changed anything.
I am sorry but the upgrade did not fix the issue. I just want to add that if I set the size but set it to exactly the original photo size, the issue does not occur.
Should I report this on github?
that's strange, are you comfortable sharing your repo here? I could take a peek and see what's odd about it
sure
the fossify-website branch
because you have placed all your images inside public directory, no optimization takes place when using <Image />
I could not detect the corruption so far but because you want to use <Image /> your image needs to be placed inside src directory
// Footer.astro
---
import { Image } from "astro:assets";
import logohorizontal from "../assets/Logo-horizontal.png" //the image is stored in src/assets folder
---
<Image
src={logohorizontal}
alt="horizontal Fossify logo with title"
height="75"
width="200"
/>
similar logic but applied in App-card.astro
<Image
src=`/src/assets/app-screenshots/${app?.data.img}` // the images are stored in src/assets/app-screenshots folder
alt=`${app?.data.title} screenshot`
width="220" //no need to specify unit when using <Image />
height="400"
/>
I do have my photos in assets and not in public
that is another thing, I have to /src/assets.. and can't use ../assets/... (I am sorry, this is not true, I had a typing issue)
i have to assume its a local change
and not something pushed in the repo rn?
it is pushed and is in the fossify-website branch
cant find the corruption in Chrome Browser in footer with this snippet
<Image src={logo} alt="horizontal Fossify logo with title" width={200} height={72} />
I am using firefox and can confirm it is working in Chrome
omw to install firefox running_metroid
so it is a firefox issue
clean install π
π
any settings or extensions acting up?
i will try building and previewing
edit: no issue found in preview
I did disable all the extensions and gettings the same results.
I will try on another PC
I am sorry I waisted your time by not testing enough on my side
ahh its fine, firefox issues are legitimate concerns for a plethora of users
removing node_modules and then running npm i is also an option 
That did not work
What version of firefox are you running?
I am on 124.0.1 on Fedora Linux 39
124.0.1 Windows 10
Thank you a lot
i dont have access to a fedora workstation but assuming this is a reproducible issue, Erika will know how to handle this
I do not know what the issue could be
apologies for dat π
I am installing a virtual machine to test it there
OK, I did some testing
Works fine in windows, firefox 123 and 124
Doesn't work on fedora linux 39 and latest nightly build firefox 123 and 124
tried with npm 20.10 and 20.11
Should I open an issue on github?
I doubt there's anything we'd be able to do