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

Asset thumbnail generator doesn't skip image processing for GIF files (transformGifs) #3110

Closed
arifje opened this issue Jul 18, 2018 · 1 comment
Assignees
Labels
bug severity:minor Cosmetic issues or bugs with simple workarounds

Comments

@arifje
Copy link

arifje commented Jul 18, 2018

Config item "transformGifs" is ignored when thumbs are generated for an asset in the control/entry panel. So, when uploading a GIF, the processing always runs which causes server time outs.

Craft CMS 3.0.16
PHP 7.0.30

@brandonkelly brandonkelly added bug severity:minor Cosmetic issues or bugs with simple workarounds labels Jul 18, 2018
@arifje
Copy link
Author

arifje commented Sep 13, 2018

Any chance on getting this fixed any time soon? Seems like a quick fix and it's causing lot's of time outs here.

In the meantime I did a fix myself that solves it, but I don't know if it's the right way (new to Craft).

But anyway, here it is;

File: /vendor/craftcms/cms/src/services/Assets.php
Function: getThumbUrl()

Added:

if ($asset->getMimeType() === 'image/gif' && !Craft::$app->getConfig()->getGeneral()->transformGifs) {
  return false;                
}

Cheers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug severity:minor Cosmetic issues or bugs with simple workarounds
Projects
None yet
Development

No branches or pull requests

3 participants