• Resolved ladymercury

    (@ladymercury)


    I’ve originally posted about this issue at the general troubleshooting forum but after isolating the plugins, I realized that this is something specific to Jetpack:

    Heyo,

    I’ve already spoken to my host about this issue and we’ve concluded that this is a problem on the WordPress end not the host as the files are successfully uploading to the server — they’re just not displaying.

    So the issue is this. Any JPG file larger than 2MB will upload to the server but will not be acknowledged by WordPress. In fact, it kicks back an error saying that the file can not be uploaded try again later. The host saw nothing reported in the error log and we both confirmed that the files are being uploaded successfully.

    Uploading via the browser will hang on media-new.php with a white page without redirecting back to the media library.

    There is no issues with the JSON/Jquery because no other file type will deliver these errors and JPGs under 2MB upload just fine.

    I am completely at a loss as to why this is happening. I have not been able to successfully run the blog since I started having this issue with large JPG uploads.

    TL;DR

    • Uploading JPG files over 2MB produces error despite uploading to the server without issue.
    • Media-new.php hangs and will not redirect to library. Refreshing simply reuploads the image.
    • Thumbnails are inaccessible and can not be added to posts
    • YET if you access the files ‘Edit Media’ page, the image will display
    • ?????
    • No Profit

    I’ve already disabled Photon and Carousel but nothing has changed. I am totally at a loss and my searching is pulling nothing up on how Jetpack is affecting JPG uploads larger than 2MB.

    Help wanted.

    https://www.ads-software.com/plugins/jetpack/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    While some of Jetpack’s modules allow you to customize the look of the images on your site (Carousel, Tiled Galleries, and slideshows for example), the plugin doesn’t control or change how images are uploaded in your dashboard. That’s handled by WordPress itself.

    If you run into issues when uploading large images, and if deactivating a plugin like Jetpack solves the issue, the problem is most likely linked to memory limitations of your hosting plan. Deactivating Jetpack probably just freed up just enough memory for the upload to complete. However, if you were to try to upload an even larger image, the problem would probably appear again.

    You can read more about this common WordPress issue here:
    https://www.ads-software.com/support/topic/25-imagemedia-uploader-problems?replies=1&view=all

    Filesize is largely irrelevant, it’s the width and height of the image that matters. Smaller images require less RAM. Although WordPress does attempt to tell PHP to allow it enough RAM, not all server configurations allow this and so PHP may not be set to have enough memory to work with larger images. Resize the images to web-sizes before uploading them.

    If you can’t afford uploading smaller images, I’d recommend that you get in touch with your hosting provider and ask them if you can get more memory allocated to your site.

    I hope this helps.

    Thread Starter ladymercury

    (@ladymercury)

    The host just increased the memory allocation for my WP installations and are baffled that even with the memory increase this problem is still happening.

    The uploads are completed. That is not the issue. They are being uploaded normally to the server and they appear in the respective directory. If the plugin is not activated, there is no problems uploading the images. If there was a memory problem, I would not be able to upload any image regardless of filetype if the size is too large. PNG and GIFs upload without issue.

    The issue is that when the JPGs are being uploaded to WordPress, the software is not displaying the thumbnails properly. I can, of course, access the edit file page and have the image appear as if nothing happened.

    Case in point, here are screencaps of what I am talking about:

    https://imgur.com/UDvaoov
    https://imgur.com/WpIBLwe
    https://imgur.com/Q1rTFns
    https://imgur.com/sIMgq2K

    I do not know if there is a problem with Jetpack trying to compress or optimize the JPEG images and that in itself is causing it to break. Because my host says no errors are firing off and there are no problems on their end affecting this WordPress/Jetpack installation.

    Looking at the screencaps, it seems that WordPress is acknowledging the fact that there is a file within wp-content but it has having problems producing the thumbnails for the images.

    I honestly do not want to deactivate Jetpack in order to upload images without issue. Are you saying that even despite the files uploading without a problem there still could be a memory issue with thumbnail creation?

    I’ll be contacting my host in the mean time with a link to this thread to see if this will help them in resolving this if this happens to be a memory issue.

    Plugin Author Jeremy Herve

    (@jeherve)

    Jetpack Mechanic ??

    If there was a memory problem, I would not be able to upload any image regardless of filetype if the size is too large. PNG and GIFs upload without issue.

    Although file size obviously matters and will affect the amount of memory needed to process your images, file type and the type of compression used with the image matter as well; your server’s image processing software will need to work on those images to generate multiple resized versions.

    do not know if there is a problem with Jetpack trying to compress or optimize the JPEG images and that in itself is causing it to break.

    Jetpack doesn’t touch your images on upload, so we can exclude that theory. Jetpack only starts interacting with your images when you insert them into a post.

    Looking at the screencaps, it seems that WordPress is acknowledging the fact that there is a file within wp-content but it has having problems producing the thumbnails for the images.

    Yes, that seems to be the issue. Uploading the original image is actually only a small part of the work WordPress does behind the scenes when you add a new image via Media > Add New. Once the image is uploaded, WordPress still has to grab meta data about that image (EXIF, width, height, …), and then generates multiple resized versions of the image. It can be only 3 resized images (thumbnail, medium, large, as set under Settings > Media in your dashboard), but themes and plugins can also define additional image sizes that will be created on upload. All this, as you can imagine, requires some memory.

    Hopefully your hosting provider can dig into this a bit more with the help of the information in this thread. If they still don’t see any errors, I’d recommend using WordPress’ built-in error reporting tools to find out more.

    Let me know how it goes.

    Thread Starter ladymercury

    (@ladymercury)

    Well!

    Currently dealing with the host and they’ve figured out what’s going on based on the post you wrote that I’ve provided and we’re currently working on getting things worked out. ?? Thanks so much, seems to be another memory issue.

    Might need to upgrade my plan to handle larger images! Or decrease my image dimensions.

    Thread Starter ladymercury

    (@ladymercury)

    And we’ve fixed the problem.

    Thanks!

    I have the same problem. Do you remember how you fixed it? I have increased the memory_limit to 512mb

    This fixed it:

    add_filter( ‘wp_image_editors’, ‘change_graphic_lib’ );
    
    function change_graphic_lib($array) {
    return array( ‘WP_Image_Editor_GD’, ‘WP_Image_Editor_Imagick’ );
    }

    found here:https://www.ads-software.com/support/topic/http-error-when-uploading-images-17/

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘JPG files over 2MB not uploading 'correctly'’ is closed to new replies.