ElMassimo/vite-plugin-image-presets

`&src` argument gives bad `/@imagepresets/[id].[ext]` path (vite 5)

rikki-ts opened this issue · 3 comments

the import for the file in question:
import rebrandedImage from "../../../images/example.jpeg?preset=800&src"

Screenshot 2024-01-22 at 12 33 37

the preset:

imagePresets({
     800: widthPreset({
          widths: [800],
          loading: "lazy",
          formats: {
            png: { quality: 70 },
            jpeg: { quality: 70 },
          },
      })
})

what am i missing?

vite: 5.0.8
sharp: 0.33.2

updating the title as seeing this is the exposed virtual id, I am assuming that this is resulting from a breaking api change in vite 5

I think it's related to this change:
vitejs/vite#14818

Apologies, I found I had this image with any vite plugin that touched images, so i think it had something to do with my install or config approach