shishkin / astro-pagefind

Astro integration for Pagefind static site search.
MIT License
267 stars 15 forks source link

Support Astro Image Optimization #75

Open Thodor12 opened 8 months ago

Thodor12 commented 8 months ago

When you build your project and you're using optimized images, Astro will use a dev url in the format of:

_image?href={path}&origWidth={number}&origHeight={number}&origFormat={image type}&w=300&f=webp

However, pagefind will use the finalized URL of the built image to keep in the pagefind data:

/_astro/{image name}.{random id}.{format}

This causes all images not to be shown when in dev, making it difficult to really tell what the final product is going to be, basically meaning you have to test using live builds.