WP Smush Pro giving API: 500 Internal Server Error

Bulk smush, not compression all images. It giving Error posting to API: 500 Internal Server Error.

  • Predrag Dubajic

    Hi Brad,

    Hope you're doing well.

    I had a look at your media library and I can see that there are some broken images in there.
    That's probably why Smush can't get to them in order to optimize them and returns the above errors.

    Can you try removing the broken files, upload new ones that are loading properly in your media library and then give Bulk Smush another try?

    Let us know if it worked after that.

    Best regards,
    Predrag

  • Predrag Dubajic

    Hi Brad,

    Yes, that's the site I'm looking at.

    If you go to your Media panel you will see that 3 images on first page are missing thumbnails and if you click on those broken images you will see that the preview is not loading for them as well.

    Now, since Smush optimizes both original images and thumbnails, if there are broken thumbnails there will be errors when trying to fetch them.
    Uploading new images or regenerating thumbnails should sort these broken thumbnails.

    Also I know some of the files that didnt smash are the 4 on my home screen...those four are showing up on my pc and mobile.....

    About these four images on your home page, page speed test has two reports for image optimization.

    1. Compressing - This one's is telling that image can be optimized and that's what smushing takes care of.

    2. Compressing and resizing - This tells us that image is larger than its actual HTML holder.

    The second one is what's shown in your results and that's because your theme is loading images larger than it's HTML holder.
    In your case the holder of those images is 244x200 pixels while the images inside are loaded in full size, first one is 960x720 pixels.
    Unfortunately this is not something Smush can deal with since the theme code is written in the way to call the larger image, and even though the image is compressed speed test doesn't like loading image larger than its holder, so this is something you need to check with the theme devs.

    You can find some more information about this in this blog post:
    https://premium.wpmudev.org/blog/compress-resize-images-wordpress/

    Best regards,
    Predrag

  • Predrag Dubajic

    Hi Brad,

    Resolving this depends on how this section is created on your home page, is it handled by the theme or plugin and how are they handling those images.
    So check first how they are added and if you have an option to use direct URL in that section, if you do then link it to smaller thumbnail, one that's closest to 244x200 size.

    If there's no option to use direct link then you will need to use different size for full size image.
    There are two things to consider here as well.
    If the image is not used anywhere else and there's no need for the current larger size that you have now then you can edit the image directly in WordPress and resize it to the one you are using.
    However if you do use current full size on other places then it's better to download it, resize it to 244x400 and then upload it as new image and use that new size on homepage.

    Best regards,
    Predrag

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.