WordPress.org

Ready to get started?Download WordPress

Forums

Changing Thumbnail Size (9 posts)

  1. sgluskin
    Member
    Posted 8 years ago #

    I'd like to change the thumbnail size from 128 X 96 to 256 X 192?

    Anybody know where/how I can do that?

    Thanks,

    Shai

  2. moshu
    Member
    Posted 8 years ago #

    You would have to edit core files for that - which isn't a healthy thing.
    Anyway, look at wp-admin/inline-uploading.php around line 84 and further.
    WARNING: I didn't test it, just found these lines. There might be other code involved, too.

  3. Thermoptic
    Member
    Posted 8 years ago #

    I just replaced all the 128 and 96 lines in the inline-uploading.php with 256 X 192 and it worked.
    WP2 now rescales the thumbnail version of the image to 256 X 192.

    But.. when you drag&drop or insert the thumbnail into the post its still 128 X 96.. well i can still go into the html post editor and just remove those lines, but thats just much to work..

    So i did another searh for 128 and 96 and got 6 hits of .php files that includes those numbers.. i dont think i dare changing all of these, dont want to mess everyting up.

  4. sgluskin
    Member
    Posted 8 years ago #

    Thermoptic,

    Great that you tried this. I haven't gotten the chance yet. Questions that come up are:

    Did you check to see the pixel size of the thumbnail file?

    Also, the problem you describe is no different than the problem that currently exists if you choose "original" file size. The display html has it set to 128 by 96 but you can size it up in the html without any loss of quality to the actual "original" size of the upload. That is a bug, I'm sure they'll get that part right in a future update.

    Shai

  5. billh
    Member
    Posted 8 years ago #

    If you use the Iimage Browser plugin, you can set the size of the plugin to any size desired at the time of upload.

  6. sjusc10
    Member
    Posted 8 years ago #

    sgluskin and others who might be interested,

    Here's what I tried, and it works well for my friend. I don't know why it didn't work fully for Thermoptic.

    Hopefully this helps you:

    In inline-uploading.php, look at lines 84-87.

    You'll want to change the values of 128 & 96 (two of each) to the values of your choice (they should fit the ratio 4:3).

    To the best of my knowledge, you won't have to worry about anything else because that's the only function that creates thumbnails for WP.

    Hopefully that helps you, and anybody else who might be interested. Good luck!

  7. jim_m
    Member
    Posted 8 years ago #

    I came across another a problem with this solution. See:

    wordpress.org/support/topic/74794

  8. saqib81
    Member
    Posted 8 years ago #

    Hi,
    I am new to use wordpress i am facing the following error:

    "Your PHP installation appears to be missing the MySQL which is required for WordPress."

    Can any one help me to resolve this.

    Thanks,
    Bye.

  9. bibihest
    Member
    Posted 7 years ago #

    I have now found out how to change the inline-uploading.php to make bigger thumbnails.

    Its still not perfect and has a little bug in the image list. Here is what I have done and now I have much bigger images in my posts but still small images in the image list..

    Line numbers might not be exact, so do a search

    Line 237
    find: $height_width = 'height="'.$imag.........
    todo: //$height_width = 'height="'.$imag (has to be removed)
    not sure if its my server that has speciel settings, but $height_width is empty for me always.

    Line 88-91
    find: if ( $imagedata['width'] > .........
    There will be a number in each line. This will set the new size. 2 x width and 2 x height

    Line 244 & 245
    find: imga[{$ID}] = '<img id= (......
    find: imgb[{$ID}] = '<img id= (......
    todo: Insert width=\"96px\" like this
    <img width=\"96px\" id= (
    This is the size of the thumbnails in the image list

    Line 249
    find: <div id='div{$ID}' class='imagewrap.......
    todo: in the next line, insert width=\"96px\" like above
    This also fixes the size in the image list. Needs to be done in all three places or the thumbnail will get biger when you choose to make a link or not.

    Thats all I have done and now I have large thumbnails and small thunmbnails in the image list.

    There is a bug in the image list with this, but it shouldnt be a problem. It will just show the "next" button even though it shouldn't.

    I hope someone can use this becaue I have used many hours testing it now :)

    Edit: Remember to make a copy of your working file first and you need to upload all your pictures again to make it work with your pictures.
    And use at your own risk.

Topic Closed

This topic has been closed to new replies.

About this Topic