RafidMuhymin / astro-imagetools

Image Optimization tools for the Astro JS framework
astro-imagetools-docs.vercel.app
MIT License
401 stars 45 forks source link

[BUG] .JPG photo format not being recognized #137

Open OlshaMB opened 1 year ago

OlshaMB commented 1 year ago

I am getting this error in the console:

Error

here is how ask for an image:

await renderImg({
  src: process.cwd()+"/"+path,
  alt: "My photo",
  breakpoints: {
     maxWidth: 5000
  }
})

where path is something like this "src/pages/photos/photo.JPG"

OlshaMB commented 1 year ago

My guess is that astro thinks the extension of the file is .33333333333333 - incorrect, i renamed .JPG file to .jpeg format and now everything works

OlshaMB commented 1 year ago

So i think importer is not registered for JPG and caps names.

stephanbogner commented 1 year ago

Sounds like a duplicate of the issue #129 I filed

spokospace commented 12 months ago

I think i have similar issue: [Error: Input file has corrupt header: VipsForeignLoad: "C:\www\2023\test\node_modules\.cache\astro-imagetools\e8906cb402b79d079b52db501ada860c.jpg" is not a known file format]

but it's always after generate about 700 first images. There is any option for fetch delay to remote images?