• Drbappaditya Mishra

    (@bappadityamishra)


    hi guys, today i going to share another tricks which i had done to avoid automatic thumbnail creation by wordpress.

    i have my four website http://ra-re.org , http://drbappadityamishra.in

    and another two run on wordpress 3.3.1 and minimatica theme.

    My webhost is Hostgator.com

    they are good but only problem with that they promise me unlimited hosting but
    in reality they gave me limitation of inodes (0.25 million).

    so i became very much conscious about that.
    in the mean time i found that i upload only four hundred photos to my gallery but inodes increased 2800 that means one image create 7 inodes

    and on details investigation i found that one image saved in different sizes (6) including original.

    i searched all over internet different solution that i have to set media settings to ‘0’ . but alas it not worked for me.

    at last i found the image created by functions.php of theme

    // Add support for Post Formats
    	add_theme_support( 'post-formats', array( 'image', 'gallery', 'video', 'audio', 'aside', 'link' ) );
    	// Add support for post formats and custom image sizes specific to theme locations
    	add_theme_support( 'post-thumbnails', array( 'post' ) );
    	add_image_size( 'slider-thumb', 600, 400, 1 );
    	add_image_size( 'homepage-thumb', 150, 150, 1 );
    	add_image_size( 'gallery-thumb', 200, 200, 1 );
    	add_image_size( 'video-thumb', 700, 444, 1 );
    	add_image_size( 'single-thumb', 460, 348 );
    	add_image_size( 'attachment-thumb', 688, 9999 ); // no crop flag, unlimited height
    	// Allows users to set a custom background
    	add_custom_background();
    	// Allows users to set a custom header image
    	if ( ! defined( 'HEADER_TEXTCOLOR' ) )

    i change all the size to 9999 and it works or me.

    just wait a minute guys.

    it was not the solution because another problem started

    i my homepage my thumbnail becomes original size and created distorted page .

    though no more extra thumbnail created but i am very much upset.

    then i found the script which resize the image.

    go to ROOT>WP-INCLUDES >FUNCTIONS.PHP

    edit and search for$resized_file = image_resize($file, $width, $height, $crop);

    delete this line .

    hurray problem solved no more resize can be done wordpress.

    oh yes theme functions.php should be kept to default sizes (not 9999 which i mention previously)

    guys i know that i am not a webmaster even I have not any deep knowledge any with this technical job because my profession is different.
    but i felt that i should share this with others as it may help others.

    if you have query any suggestion to me kindly mail me
    [email address removed]

Viewing 4 replies - 1 through 4 (of 4 total)
  • esmi

    (@esmi)

    Again, please do not edit WordPress core.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    WordPress creates 3 to 4 images per upload:

    1) The original image.
    2) The thumbmail.
    3) The medium size
    4) The large size (if and only if it’s smaller than the original file)

    at last i found the image created by functions.php of theme

    That means your THEME is doing this, not WP (subtle diff). Either get a better host with more space, or get a different theme. But hacking core is a BAD IDEA. Don’t do it.

    Thread Starter Drbappaditya Mishra

    (@bappadityamishra)

    Thanks to @esmi and @ipstenu for your quick reply.

    I have no intention to crack the wordpress core.

    I do not know much about that. I just do that just to solve my problem .
    No other intention I have
    ok i will change that core . can you give me some suggestion about minimatica theme
    to stop thumbnail creation and also a good host.

    Thread Starter Drbappaditya Mishra

    (@bappadityamishra)

    @esmi and @ipstenu please delete this post as it may be bad that i have share a view about core hacking

    please delete this post

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘how to avoid thumbnail creation’ is closed to new replies.