mautic / docker-mautic

Docker Image for Mautic
https://www.mautic.org
381 stars 279 forks source link

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

Open MattBred opened 5 years ago

MattBred commented 5 years ago

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!](https://app.bountysource.com/issues/83381300-image-thumbnails-broken-because-gd-extension-missing-and-other-issues?utm_campaign=plugin&utm_content=tracker%2F20392502&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://app.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F20392502&utm_medium=issues&utm_source=github).
luizeof commented 4 years ago

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

GFWagnitz commented 4 years ago

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

snoblucha commented 3 years ago

@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