-
Notifications
You must be signed in to change notification settings - Fork 1
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 GIFs not loading in production #72
Fix GIFs not loading in production #72
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
…-production-and-test-deploy-leaderboard
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a shame that next/image doesn't seem to have better optimization support for GIFs but this manual solution does the job for the foreseeable future! Might want to revisit at some point if next/image gets updated options.
Info
Closes #60. (If there is no issue for this pull request yet, please create one or
delete this line if the pull request is for a very minor tweak).
Description
Next Image optimization doesn't support animated images including GIFs. Optimization is supposed to be automatically disabled for GIFs, but it looks like their detector isn't working properly on our URLs (possibly due to extra parameters after the
.gif
. This commit manually disables optimization for gifs.Changes
isSrcAGif
function toutils.js
that checks for gifs using a new regex.Type of Change
expected)
linting/formatting)
workflows)
Testing
I have tested that my changes fully resolve the linked issue ...
Checklist
src/lib
functions and commented hard to understand areasanywhere else.
Screenshots
Please include a screenshot of your Cypress testing suite passing successfully.
If you made any visual changes to the website, please include relevant screenshots below.