Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

on my theme, i found this script

add_image_size( 'slider', 464, 249, true );
add_image_size( 'fmenu', 306, 280, true );
add_image_size( 'teamthumb', 138, 207, true );
add_image_size( 'imlink', 286, 140, true );
add_image_size( 'albmlink', 274, 274, true );
add_image_size( 'fppost', 90, 90, true ); 
add_image_size( 'fslide', 520, 280, true );  

i have disabled this, but when i upload another image, its generates 3 more images... like this:

original_file.jpg
origiinal_file-100x100.jpg
origiinal_file-109x109.jpg

i need only to upload the original file, there's a way to solve this??

I can't find where is this another 2 images sizes...

share|improve this question

2 Answers 2

up vote 3 down vote accepted

I believe those are probably generated by the default WordPress sizes - thumbnail, medium and large. (See Appearance > Media for where those sizes are set).

If you want to eliminate the extra image sizes the simplest way might be to eliminate some of your theme's custom image sizes and use the defaults instead. OR, you can "unset" the defaults. This article explains how to do that, but to sum up here's the code you'd add to your theme's functions.php file:

/**
 * Remove standard image sizes so that these sizes are not
 * created during the Media Upload process
 *
 * Tested with WP 3.2.1
 *
 * Hooked to intermediate_image_sizes_advanced filter
 * See wp_generate_attachment_metadata( $attachment_id, $file ) in wp-admin/includes/image.php
 *
 * @param $sizes, array of default and added image sizes
 * @return $sizes, modified array of image sizes
 * @author Ade Walker http://www.studiograsshopper.ch
 */
function sgr_filter_image_sizes( $sizes) {

    unset( $sizes['thumbnail']);
    unset( $sizes['medium']);
    unset( $sizes['large']);

    return $sizes;
}
add_filter('intermediate_image_sizes_advanced', 'sgr_filter_image_sizes');

Hope this helps, best of luck!

share|improve this answer
    
i add this code on my funcions.php, but not happens.. the same *** -100x100.jpg and 109x109.jpg are created.. –  Preston Apr 19 '12 at 17:39
    
wow i found.. the 100x100 its generated for Simple Gallery plugin.. and 109x109 its generated for the thumb admin of simple gallery.... –  Preston Apr 19 '12 at 17:50
    
Glad you found it! Sorry my answer wasn't of more help. –  Michelle Apr 19 '12 at 17:52

If those are the default alternate sizes, you don't need any code to do this.

To get rid of the default alternate sizes, just go to Settings > Media in the admin, and set the sizes for "Thumbnail", "Medium" and "Large" to 0px by 0px. Once you save these settings, WordPress will no longer create the alternate sizes (unless additional sizes are specified in a plugin or in your functions file).

Media Settings Page

share|improve this answer
    
i set this too.. but the generate the same image sizes... –  Preston Apr 19 '12 at 17:45
    
wow i found.. the 100x100 its generated for Simple Gallery plugin.. and 109x109 its generated for the thumb admin of simple gallery.... –  Preston Apr 19 '12 at 17:50
    
@Preston Glad you got it worked out. –  MathSmath Apr 19 '12 at 19:35

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.