hi guys, today i going to share another tricks which i had done to avoid automatic thumbnail creation by wordpress.
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]
- The topic ‘how to avoid thumbnail creation’ is closed to new replies.