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

fix(astro-engine): Add support for GIF, TIFF and AVIF image imports #197

Merged
merged 1 commit into from
Aug 27, 2024

Conversation

oliverlynch
Copy link
Contributor

I'm using astro:image to optimise image assets, which appeared to be working with bookshop until I added a company logo in GIF format.

error: No loader is configured for ".gif" files: src/assets/pages/community/page.md/logo.gif

astro:image uses sharp by default to optimise images, which supports JPEG, PNG, WebP, GIF, AVIF, TIFF and SVG images. Currently bookshop build fails if GIF, TIFF or AVIF images are imported.

I have not tested this patch beyond importing a gif, tiff and avif image and building the site, which appears to work.
The tiff image does not render in the editor as tiff is not a supported image format in firefox, however the optimised version of the image on the live site is webp and renders correctly.

@Tate-CC
Copy link
Contributor

Tate-CC commented Aug 27, 2024

Thanks for your contribution @oliverlynch!

These changes all look good to me. The windows tests are having some issues but it doesn't look related, so I'm happy to merge this 👍

@Tate-CC Tate-CC merged commit 3e5e95f into CloudCannon:main Aug 27, 2024
3 of 4 checks passed
@bglw
Copy link
Contributor

bglw commented Aug 28, 2024

Thanks again @oliverlynch 🙂 This has been released in the latest Bookshop version.

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

Successfully merging this pull request may close these issues.

3 participants