Article

  • 6 years

    6 years

    Reservo / Core

    4269

Blank Image Thumbnails - Uncaught exception 'Exception' with message 'Invalid image:

Problem

Image thumbnails aren't showing and you have an error in the script logs similar to:

2017-06-24 17:46:47 - *** ERROR *** Array
(
[Error Msg] => Uncaught exception 'Exception' with message 'Invalid image: /usr/share/nginx/html/ucloud.mfscripts.com/www/core/cache/plugins/imageviewer/_tmp/img-002867cd7cc03d6b2407198a1dbf4361' in /usr/share/nginx/html/ucloud.mfscripts.com/www/core/includes/image_resizer/SimpleImage.php:1113
Stack trace:
#0 /usr/share/nginx/html/ucloud.mfscripts.com/www/core/includes/image_resizer/SimpleImage.php(535): SimpleImage->get_meta_data()
#1 /usr/share/nginx/html/ucloud.mfscripts.com/www/core/includes/image_resizer/CustomSimpleImage.php(34): SimpleImage->load('/usr/share/ngin...')
#2 /usr/share/nginx/html/ucloud.mfscripts.com/www/plugins/filepreviewer/pluginFilepreviewer.class.php(713): CustomSimpleImage->load_from_image_content('\xFF\xD8\xFF\xE1#(Exif\x00\x00II*...')
#3 /usr/share/nginx/html/ucloud.mfscripts.com/www/plugins/filepreviewer/site/resize_image_inline.php(146): PluginFilepreviewer->setupImageMetaAndCache(Object(file))
#4 {main}
thrown
[File] => /usr/share/nginx/html/ucloud.mfscripts.com/www/core/includes/image_resizer/SimpleImage.php
[Line Number] => 1113
[Error Type] => E_ERROR
)

Fix

This is a permissions issue on the cache folder. To fix it run the following via root SSH:

chmod -R 777 /usr/share/nginx/html/ucloud.mfscripts.com/www/core/cache

ReplaceĀ /usr/share/nginx/html/ucloud.mfscripts.com/www/ with the path to your script install.