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

Animated GIFs don't work with responsive images #10301

Closed
ErisDS opened this issue Dec 22, 2018 · 1 comment · Fixed by #10315
Closed

Animated GIFs don't work with responsive images #10301

ErisDS opened this issue Dec 22, 2018 · 1 comment · Fixed by #10315
Assignees
Labels
affects:api Affects the Ghost API bug [triage] something behaving unexpectedly server / core Issues relating to the server or core of Ghost

Comments

@ErisDS
Copy link
Member

ErisDS commented Dec 22, 2018

Anyone using Ghost's brand-new responsive image feature will notice that their gifs stop animating when served at reduced sizes.

This is because Sharp doesn't support resizing gifs. We need to skip the feature for gif filetypes.

Ghost keeps the original uploaded image around, and therefore once we fix this, anyone experiencing issues will see the problem go away without needing to reupload or manually intervene in any way.

To Reproduce

  1. Upload an animated gif
  2. Setup some responsive images in your theme (or use the latest Casper)
  3. Try to view the gif at one of the smaller sizes.

Technical details:

  • Ghost Version: master / >2.9.0
@ErisDS ErisDS added the bug [triage] something behaving unexpectedly label Dec 22, 2018
@naz naz added server / core Issues relating to the server or core of Ghost affects:api Affects the Ghost API labels Jan 2, 2019
@allouis allouis self-assigned this Jan 2, 2019
allouis added a commit that referenced this issue Jan 3, 2019
closes #10301

* Redirected to original image for gifs & svgs

* Created canTransformFileExtension method

* Updated image middlewares to use canTransformFileExtension
@ErisDS ErisDS assigned ErisDS and unassigned allouis Jan 15, 2019
@ErisDS
Copy link
Member Author

ErisDS commented Jan 15, 2019

Reopening as the same thing is true for .ico files. Sharp doesn't support them. I don't know if lovell/sharp#1372 will change this.

@ErisDS ErisDS reopened this Jan 15, 2019
@ErisDS ErisDS closed this as completed in d58ecda Jan 15, 2019
daniellockyer pushed a commit that referenced this issue Jul 26, 2022
closes #10301

* Redirected to original image for gifs & svgs

* Created canTransformFileExtension method

* Updated image middlewares to use canTransformFileExtension
daniellockyer pushed a commit that referenced this issue Jul 26, 2022
closes #10301

- we allow .ico files for icons, but we cannot resize these specialist files at present
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects:api Affects the Ghost API bug [triage] something behaving unexpectedly server / core Issues relating to the server or core of Ghost
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants