WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] How do I disable auto creation of thumbnails? (7 posts)

  1. pad
    Member
    Posted 7 years ago #

    Basically I use the wordpress image uploader as an uploader to upload into an /avatars folder. All avatars are the same size ALWAYS so I have no use for auto thumbnail creation in my images folder. They are simply wastes of space.

    How can I disable the auto creation of thumbnails, or at least switch it off by default?

  2. Samuel Wood (Otto)
    Tech Ninja
    Posted 7 years ago #

    Add this to your theme's functions.php file:

    function change_image_size_limit() {
    return 0;
    }
    add_filter('wp_thumbnail_creation_size_limit','change_image_size_limit');

    The thumbnail creation functions have a size limit on images. Images bigger than 3 megapixels don't get thumbnails made for them. This bit of code changes that limit to zero, so that no images get thumbnails made for them.

  3. pad
    Member
    Posted 7 years ago #

    Just the ticket. Cheers Otto!

  4. pad
    Member
    Posted 7 years ago #

    Hang on. If I do this my RSS feeds stop working...

  5. pad
    Member
    Posted 7 years ago #

    Forget it. Fixed.

  6. pulpfriction
    Member
    Posted 7 years ago #

    and what if the theme I'm using doesnt have a functions.php page...as is the case with the one I'm using

  7. drmike
    Member
    Posted 7 years ago #

    Create one:

    <?php
    
    ?>

    There you go. :)

Topic Closed

This topic has been closed to new replies.

About this Topic