Support » Fixing WordPress » Maximum File Size for Thumbnail Generation?

  • Resolved callumalden

    (@callumalden)


    Hello, I’m really curious to know if wordpress has a file size limit for thumbnail generation. I’m uploading images (vanilla install of wordpress on test domain) and images that are sized 200kb / 1mb upload fine and thumbnails are created. As you would expect.

    20-100MB file uploads and I get no thumbnail. Hmm.

    I thought the problem was with a plugin I was experimenting with, called ‘External Media‘ (which allows uploading in the WordPress Media handler from Dropbox, GDrive etc.) however after disabling and trying to rebuild the thumbnails I can’t get them to generate.

    So I thought I would ask the question. IS there perhaps a server limitation I should check for?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator t-p

    (@t-p)

    You mean post thumbnails?

    Useful codex: https://codex.wordpress.org/Post_Thumbnails#Thumbnail_Sizes

    Thread Starter callumalden

    (@callumalden)

    Hello, yes I’m talking about post thumbnails. My question is: will wordpress create thumbnails when an uploaded image size is quite large 20-100mb. It seems to fail on my server. I get an AJAX error in console, but no end to the AJAX spinner, no thumbnail. However, the images do upload, and are available from the Media Browser on a page refresh.

    Moderator t-p

    (@t-p)

    It seems to fail on my server.

    Probably your server has file size limit.

    In general, When you upload an image, WordPress automatically generates several different sizes of it. By default, these sizes are:

    “Thumbnail”: 150px square
    “Medium”: 300px along its largest dimension
    “Large”: 640px along its largest dimension
    “Original”: the initial dimensions of the uploaded image

    The “limits” are not hard-coded or set anywhere. What normally happens is that the image processing to generate the thumbnails takes up too much memory, can’t complete and stops/breaks. That leaves you with the orginal image set, but nothing else. How big the image that causes that could be different depending on a few different factors, and file size is only one of them. There’s also resolution, quality, format and probably others that I haven’t thought at this point.

    As a general rule, if you’re seeing issues, you can increase the available memory available to PHP processes and that will help to a point.

    BUT… On a website where images are meant to be displayed on the site, there’s no reason at all to be uploading 20-100MB image files. That’s way too big to be useful, and you’d be a lot better off resizing them to something more reasonable before you upload them.

    Thread Starter callumalden

    (@callumalden)

    @catacaustic – you’ve probably hit the nail on the head. The images I’m uploading to my wordpress (woocommerce product posts) are intended as print-ready files which are then served directly to my printer at a later step of the process.

    So the resolution is very high, thousands of pixels all over the place!

    I think you are spot-on with your diagnosis; the issue will be PHP Memory availability. I’ll investigate what I can do regards that with my host. I’m pretty sure WordPress inherits the values from the server these days, and they’ll be ‘maxed’ out, whatever that means.

    Thank you so much, for understanding my problem and using your experience to give a clear answer.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Maximum File Size for Thumbnail Generation?’ is closed to new replies.