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

Image thumbnails broken because gd extension missing, and other issues #140

Open
MattBred opened this issue Nov 8, 2019 · 3 comments
Open

Comments

@MattBred
Copy link

MattBred commented Nov 8, 2019

Using mautic/mautic:latest

When using the template builder, if I go to preview photos, I get a bunch of broken thumbnails. Navigating to the URL of the thumbnail image gives me this error

{"Error":"WideImage requires the GD extension, but it's apparently not loaded.","Code":"-1","Properties":{"Date Created":null,"Date Modified":null,"Height":null,"Width":null,"Size":null}}

After installing libpng-dev & php-gd, I still get the following error in the logs:
[2019-11-08 03:56:21] mautic.CRITICAL: Uncaught PHP Exception Symfony\Component\Debug\Exception\UndefinedFunctionException: "Attempted to call function "imagecreatefromjpeg" from the global namespace." at /var/www/html/app/bundles/CoreBundle/Assets/js/libraries/ckeditor/filemanager/connectors/php/inc/wideimage/lib/Mapper/JPEG.php line 15 {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\UndefinedFunctionException(code: 0): Attempted to call function \"imagecreatefromjpeg\" from the global namespace. at /var/www/html/app/bundles/CoreBundle/Assets/js/libraries/ckeditor/filemanager/connectors/php/inc/wideimage/lib/Mapper/JPEG.php:15)"} []


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@luizeof
Copy link
Member

luizeof commented Dec 6, 2019

thanks for reporting ... I'll work on this today.

@GFWagnitz
Copy link

GFWagnitz commented Dec 16, 2019

@luizeof I just sent up the PR #146 addressing this issue, that was a problem that my team had also encountered.

@snoblucha
Copy link

@luizeof I hit this issue today. Also there is missing exif extension to process uploaded file. In the Dockerfile (mautic3 branch) there is wrong include directory, should be

RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-png-dir=/usr/include/ --with-jpeg-dir=/usr/include/ \
&& docker-php-ext-install  gd \
&& docker-php-ext-install exif

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

No branches or pull requests

4 participants