Wordpress Creating Multiple Image Thumbnails When Uploading Images

Discussion in 'WordPress' started by freelance deziner, Mar 12, 2012.

  1. #1
    Hi all,

    I am having some trouble with my wordpress site. In my wordpress dashboard > Media > I have set all the thumbnails size to 0 (zero) cause I don't want to re-create any thumbnail from the images I upload and insert into the posts.

    But when uploading any image I can see there are 2 thumbnails created.

    From where these thumbnails are controlled? Any help?
     
    freelance deziner, Mar 12, 2012 IP
  2. b4db0y

    b4db0y Notable Member

    Messages:
    3,523
    Likes Received:
    74
    Best Answers:
    0
    Trophy Points:
    205
    #2
    Hi,
    Login to your WordPress
    Settings -> Media -> Untick Crop thumbnail to exact dimensions (normally thumbnails are proportional)
     
    b4db0y, Mar 12, 2012 IP
  3. freelance deziner

    freelance deziner Member

    Messages:
    270
    Likes Received:
    1
    Best Answers:
    1
    Trophy Points:
    40
    #3
    Its already unticked :(
     
    freelance deziner, Mar 12, 2012 IP
  4. gabrielle06

    gabrielle06 Well-Known Member

    Messages:
    161
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    110
    #4
    It's not a problem with WordPress, it's with your theme. The theme tells WP how many images will be cropped upon upload. Follow this:

    Dashboard>Appearance>Editor>functions.php and look for add_image_size( 'anything', xxx, xxx, true );

    You said two thumbnails are created once you upload a photo, then there should be two lines of these functions. you can turn it to 'false' or simply delete them. Each line tells WP to crop images based on size your specify.
     
    gabrielle06, Mar 12, 2012 IP
  5. Cameljourney

    Cameljourney Prominent Member

    Messages:
    1,731
    Likes Received:
    107
    Best Answers:
    0
    Trophy Points:
    300
    #5
    By default, wordpress created thumbnail for any image uploaded, even if you didn't set it up from your theme.

    Currently, there's no quick fix for this, but it's still possible to overcome if you comfortable editing the wp core files. Of course, the downside here is you have to make the change again when you update wodpress to newer version.


    Go to wp-admin/includes/image.php in your wp core file (For reference:http://core.trac.wordpress.org/browser/trunk/wp-admin/includes/image.php), and find the following lines :

    [​IMG]

    delete all lines highlighted in yellow, then save it.

    Wordpress won't create that bloated thumbnail anymore.


    Good luck

    .
     
    Cameljourney, Mar 14, 2012 IP