The simpler media website CMS
So I've uploaded a large amount of images from my phone. These images are no different then the next one, yet the software randomly decides to choose many of them as NOT jpeg, example:
===
{29266:Mon, 17 Jun 2019 12:10:36 GMT}
WARNING: imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable error: Not a JPEG file: starts with 0x04 0x00 in /home/wett/public_html/zp-core/lib-GD.php on line 101
imagecreatefromjpeg called from zp_imageGet (lib-GD.php [101])
from cacheImage (functions-image.php [221])
from i.php [166]
{29266:Mon, 17 Jun 2019 12:10:36 GMT}
WARNING: imagecreatefromjpeg(): '/home/wett/public_html/albums/Trip to the Philippines/One Hundred Islands/20190416_074901.jpg' is not a valid JPEG file in /home/wett/public_html/zp-core/lib-GD.php on line 101
imagecreatefromjpeg called from zp_imageGet (lib-GD.php [101])
from cacheImage (functions-image.php [221])
from i.php [166]
{29268:Mon, 17 Jun 2019 12:10:38 GMT}
WARNING: imagecreatefromjpeg(): gd-jpeg: JPEG library reports unrecoverable error: Not a JPEG file: starts with 0x04 0x00 in /home/wett/public_html/zp-core/lib-GD.php on line 101
imagecreatefromjpeg called from zp_imageGet (lib-GD.php [101])
from cacheImage (functions-image.php [221])
from i.php [166]
{29268:Mon, 17 Jun 2019 12:10:38 GMT}
WARNING: imagecreatefromjpeg(): '/home/wett/public_html/albums/Trip to the Philippines/One Hundred Islands/20190416_074901.jpg' is not a valid JPEG file in /home/wett/public_html/zp-core/lib-GD.php on line 101
imagecreatefromjpeg called from zp_imageGet (lib-GD.php [101])
from cacheImage (functions-image.php [221])
I cannot seem to figure out why this is happening. Some images are fine and other images are not. Yet they are taking from the same camera. Any idea's what is going on with some of these images?
Comments
Can't really say, never seen that. Apparently something is not right with those files. Here is a stackoverflow topic on that matter: https://stackoverflow.com/questions/37014055/not-a-jpeg-file-starts-with-0x0a-0x4c-error
Try to open the image with something else (e.g. on desktop) and try to re-save it, sometimes that corrects things.
It could also be that you uploaded too many and too large (dimensionwise) image at once that you server cannot handle to process. Althought that should be other errors.
Thanks for your assistance. Checking that image, it does look like the images pulled from the log are bad ones. Checking further, I found hundreds of images not even logged to have problems, but show 500 errors. One example is this one:
http://wettstein.us/20190417_105500.jpg
I copied that exact image from the Albums folder to the document root path to test loading it. I can load the image without any trouble, but when you try to load it from the gallery, it shows no preview and clicking on the image just gives you 500 errors, example:
http://wettstein.us/Trip to the Philippines/One Hundred Islands/20190417_105500.jpg
http://wettstein.us/zp-core/full-image.php?a=Trip to the Philippines/One Hundred Islands&i=20190417_105500.jpg&q=75&wmk=!&dsp=Protected view&check=8bbf4f9d9c4dcc8db54aca74b6e205664b09a88a
The file permissions and ownerships all match. Just seems so random. only the corrupted images seem to show up under the log and those entries I provided are from them. However, all the good images that are randomly not showing, I'm not sure what the difference is between them.
Never mind, I figured it out. I started to check the image sizes and found out it was just the memory limit set in PHP. The larger images were returning 500 errors. Once I increased the PHP memory limit, everything started working normally. Sorry to bother you guys!
No problem at all. Lots of possibilities but memory is one of the prime issues if any processing fails. We have some examples how the memory requirements add up depending on the pixel dimensions. https://www.zenphoto.org/news/problems-with-albums-and-images/
You an also try to lower the Caching concurrency on Options > Image > Caching concurrency