• Resolved joemoe1984

    (@joemoe1984)


    First off I just want to say that this plugin works really well with the exception of one issue we are having.

    Some images, mainly animated gifs, are not uploading to the S3 bucket. They upload to the wp-content/uploads folder like normal. The weird part is that its not all animated gifs. Just some particular ones. Its possible that some images may have some meta data that is making things difficult or maybe not enough. (not sure)

    In our settings we have it set to delete these files once uploaded but they still exist. The url on the file after upload shows that is indeed going to the websites uploads folder and not the S3 bucket.

    Posted url to image that is having issues uploading properly. I have tested this locally and on our production site and it has issues on both.

    • This topic was modified 3 years, 5 months ago by joemoe1984.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Delicious Brains

    (@deliciousbrains)

    Diagnostic info from WP Offload Media’s “Support” tab might help.

    Also, anything in the debug.log? That might highlight an issue.

    https://deliciousbrains.com/why-use-wp-debug-log-wordpress-development/

    -IJ

    Thread Starter joemoe1984

    (@joemoe1984)

    I don’t see any error in the debug log at all. As far as it looks, it seems like it is uploading just fine from the logs.

    Thread Starter joemoe1984

    (@joemoe1984)

    Doing some deep diving, I am noticing that WordPress is not creating multiple sizes for the image. This might be causing some issues with the plugin as I am noticing that this condition is returning true:

    if ( ! empty( $new_sizes ) && ! empty( $missing_sizes ) && array_intersect_key( $missing_sizes, $new_sizes ) ) {

    This returns early and doesn’t actually upload the image to S3.

    I am going to have to figure out why WordPress is not creating image sizes for certain images. I turned off all plugins and set the theme to default and its persistent with the bare minimum settings.

    If I come up with a solution I will post it here and then close this issue. Just in case someone else has a similar issue.

    Thread Starter joemoe1984

    (@joemoe1984)

    Ok figured it out. Whoever created the image did something weird to the metadata. Since the imageMagick module is loaded in PHP I decided to download and use the CLI tool to inspect its metadata.

    Tutorial on installing and using the CLI tool here: How to view image metadata

    Instructions in case the link is broken:

    Ubuntu/Pop OS
    sudo apt install imagemagick

    Fedora
    sudo dnf install imagemagick

    Using the command:

    identify -verbose filename.gif

    The result was as follows:

    identify-im6.q16: memory allocation failed 'filename.gif' @ error/gif.c/ReadGIFImage/1303

    Since this is an issue with the file itself and ImageMagick is unable to create file sizes, the Offload Media plugin does not upload the image to S3. Based on that one condition I posted in an earlier response, it looks like the plugin needs those sizes first in order to upload.

    The solution is to redo those images so they work with ImageMagick. Closing this issue now.

    • This reply was modified 3 years, 5 months ago by joemoe1984.
    Plugin Author Delicious Brains

    (@deliciousbrains)

    Awesome, glad you solved the problem.

    -IJ

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Some images don’t upload to S3’ is closed to new replies.