The MU forums have moved to WordPress.org

reason for not thumbnailing large images ? (5 posts)

  1. quenting
    Member
    Posted 17 years ago #

    somewhere in the code:

    if ( $imagedata['width'] * $imagedata['height'] < 3 * 1024 * 1024 ) {
    if ( $imagedata['width'] > 128 && $imagedata['width'] >= $imagedata['height'] * 4 / 3 )
    $thumb = wp_create_thumbnail($file, 128);

    Is there a reason not to create a thumbnail for images larger than 3*1024*1024 ? With digital cameras offering higher resolutions, such images are becoming quite the usual, and many users complain about not being able to get a thumbnail for those.
    Why such a hardcoded limit ?

  2. lunabyte
    Member
    Posted 17 years ago #

    My guess would be that such large files (most likely) would be stopped for being over an upload limit size, but if not creating a thumbnail from an image of that size would eat some processing power. Multiplied over 'x' users doing whatever else across the box/network/site(s), could really put a crunch on things even if it were just for a minute.

    But, that's just a guess.

  3. quenting
    Member
    Posted 17 years ago #

    ok, so assuming I'm comfortable with 5 megs uploads and image resizes, there's no such thing as a hard limit in GD or something ?
    I still don't get why such a hardcoded limit. Upload size limit defined in PHP would trigger before this, so, why ?

  4. andrea_r
    Moderator
    Posted 17 years ago #

    Your guess is as good as ours. I know there's a hack buried in here somewhere to resize images on uplaod.

  5. drmike
    Member
    Posted 17 years ago #

    As to the limit, it comes up on the wp.com forums on occasion. Staff's answer has been that they don't want to put strain on the servers.

About this Topic