-
Notifications
You must be signed in to change notification settings - Fork 76
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
Mosaico fails on animated .GIFs #285
Comments
Hi @MegaphoneJon, this is interesting and must have 👍 I tried applying your patch on latest repo. I do see resized gif images being rendered but not animate. |
They animate for me - though I think I'm losing the animation timing of the original. I think I'll need to add getImageDelay and setImageDelay to preserve original timing. During my testing I was accidentally creating non-animated GIFs - one trick I used was to run |
I've created a new branch (animated-gifs) with your changes applied - https://github.com/veda-consulting/uk.co.vedaconsulting.mosaico/compare/animated-gifs?expand=1 Feel free to PR experimental code to it, so we can feedback as well. Thanks. |
@deepak-srivastava While generally I support the move to Intervention/image, it doesn't support animated GIFs: Intervention/image#176 I asked on that thread where the development branch is. While I'd rather not build both a gd-based and imagick-based solution to this, I would be willing to patch one in if I can steal it from the dev branch... |
@mattwire this issue was closed but has not been resolved, right? It's still not possible to add animated gifs, is it? @MegaphoneJon MegaphoneJon@0b9e25c are you still using this patch? It works? |
@francescbassas Originally, this extension had different code written for folks with ImageMagick installed and folks with GD installed. At some point, it was replaced with Intervention Image, an abstraction layer that supports both ImageMagick and GD. Unfortunately, Intervention Image doesn't support animated GIFs. I haven't used my patch in a long time, but to test it, you need to go to Administer » CiviMail » Mosaico Settings and from Mosaico graphics driver select (Deprecated) Direct ImageMagick API. It probably still works because the deprecated code is unlikely to have changed. |
StackExchange related discussion here https://civicrm.stackexchange.com/questions/34427 |
@francescbassas there's a dirty trick to use if you absolutely must have an animated GIF. Create the mailing as you normally would. After saving, find the static GIF in your file system and upload a copy via SFTP or similar. By uploading directly, you bypass intervention/image. |
Mosaico can't handle uploaded animated GIFs because it fails on resize.
I wrote a patch but I'm using 2.0beta4 in production, not master - and this function has been refactored into another file.
For others looking for a solution, my commit is here: MegaphoneJon@0b9e25c. I'm going to let my users test this in production and if it looks good I'll rewrite it against master.
The text was updated successfully, but these errors were encountered: