Support » Plugin: Yet Another Related Posts Plugin (YARPP) » How to stop YAARP creating thumbnails

  • Resolved telwp


    It’s taken me 2 hours to crawling through a heavily modified WP install to find what bit of code was generating thumbnails in my uploads folder when I added a new featured image to a post.

    YAARP is the culprit!

    I’d like to turn this ‘feature’ off, I don’t want my uploads folder filled with odd sized thumbnails that are never used.

    1. How can I stop YAARP doing this without hacking the core files?

    2. Out of curiosity, why does this plugin have a thumbnail generator? Can it not use the ones created by WP? Just wondering!


Viewing 15 replies - 1 through 15 (of 17 total)
  • I, too, am interested in this. My installtion is set to use 200×133 images as thumbnails, but YARPP uses 12×12 anyway (I use the thumbnails option). Since I want them to be displayed in 200×133, they get stretched…

    I guess I should add that I use the Custom display option in YAARP settings and a basic custom template, in case any thumb option gets added in the future. I just don’t want it creating thumbs itself!

    Sorry to hear that it was creating thumbnails without your awareness! YARPP does *not* generate thumbnails on the fly for its “thumbnail” feature… this must be some interaction with some other plugins.

    All of these issues are addressed in the readme. Look at the first two items in the FAQ section. That’ll tell you how to set the thumbnail size used by YARPP, as well as tell you how to control whether thumbnails are automatically generated or not (the default is no).

    Hi mitcho, not sure why you marked this as resolved, the problem still exists.

    For what it’s worth, YAARP certainly IS creating a thumbnail on my install, can you explain how an interaction with another plugin would make YAARP create a cropped thumbnail? Surely the process trigger is only within the confines of the YAARP code?

    The default YAARP thumbnail crop size appears to be 120×120.

    I did this quick test to give a step-by-step:
    I activate v4.0.4
    Click Add New Page
    Then Set Featured Image
    Upload a 750 x 550 PNG image (bg.png)
    My uploads folder now has the original image plus a “bg-120×120.png”

    If I deactivate v4.0.4, repeat adding new page/image, no 120×120 image is created.

    I then tried add_image_size to change the sizing to 130 x 130.

    Same process above, this time bg-130×130.png was auto-generated.

    Can you please give an option to completely ignore all thumbnail related code in YAARP?


    Hi again mitcho, I just had a play around with class-core.php and found that by commenting out the following code I no longer had the 120×120 cropped images being created.

    // register yarpp-thumbnail size, if theme has not already
    		// @todo: make these UI-configurable?
    		if ( !($dimensions = $this->thumbnail_dimensions()) || isset($dimensions['_default']) ) {
    			$width = 120;
    			$height = 120;
    			$crop = true;
    			add_image_size( 'yarpp-thumbnail', $width, $height, $crop );

    For now, I’ll leave it commented out but I hope that helps you in some way if this issue is more widespread than just me.

    Cheers, fantastic plugin overall, great work.

    Hmm, editing the files in YARPP itself will mean that your changes will get overwritten on a YARPP update.

    Let me think about this. I may add a hook in a future version to turn off all thumbnail handling code.

    So YARRP was the culprit ? I wasted a whole morning trying to figure out why WP kept on generating those 120×120 thumbnails always 🙁

    Yarpp generates 120*120 thumbnails every time I upload images…

    Very annoying…

    Pls @mitcho resolves this issues…

    However thanks for this excellent plug in……

    With the latest version 4.0.5 YARPP ist still producing this 120×120 thumbnails. Can you deactivate that in the future versions please?

    Until you can do this I have a solution for this problem. Just paste this code in your functions.php:

    function senaeh_only_add_medium_size( $sizes) {
    	unset( $sizes['yarpp-thumbnail'] );
        return $sizes;
    add_filter('intermediate_image_sizes_advanced', 'senaeh_only_add_medium_size');

    Hi all,

    Thank you all for your feedback. I gave this some thinking, and I think I’ve come up with a solution right in YARPP which deals with this well. This is in the latest beta, 4.0.6b4, which I invite you to try:

    The design is as follows: the yarpp-thumbnail image size will be registered (which will trigger generation of those thumbnails)…

    1. if you are automatically displaying using the thumbnails view on your site or in your RSS feeds;
    2. if you’ve called YARPP with the thumbnail view some other way (via the widget or via code) before.

    The (2) situation notices that this has happened and flips a switch internally, so it knows that thumbnails should be built, even though (1) is not the case. This switch can be changed manually using the YARPP Experiments advanced supplemental plugin.

    For 99% of users, I believe this logic above will strike a good balance between (a) not creating thumbnails if they’re not necessary (the issue in this thread) and (b) making sure thumbnails of the right size are generated if the site wants to use them.

    Please let me know what you think! 🙂 I hope to release this update as 4.0.6 soon, assuming that you guys don’t find some bugs. 🙂

    Thanks for your fast reply. In my case the new beta version works fine. It notices that I don’t use thumbnails (1.) and does not create them anymore.


    Thanks a lot for changing this.

    I am not entirely sure if this is really working, it is a bug or it is just a legacy artifact.

    If you take a look at this article:

    You can see the three YARPP icons at the bottom. The first two of those are somehow rescaled. The Plugin picks the 120×120 sized thumbnails and rescales them to a width of 190px (which I am telling it to do via CSS). Of course that looks bad because it is basing this on the self-generated 120x120px image instead of the actual featured image.

    I am using version 4.0.6 of YARPP with the “Thumbnail” setting. Or does this setting NOT refer to the article featured image?

    Stranger still is the fact that YARPP choses to pick the correct sized image for the third related link, using the 300x200px image and displaying a downscaled version of it.

    And what confuses me even more is that the html code it uses says ‘width=”120″ height=”80″‘ which is not what is displayed.

    Could you explain that? Is there anything I can change to fix this?

    @felixo I think this is an artifact of some images being uploaded when certain settings were in effect, and others at another time.

    What you want to do is to run the “Rebuild Thumbnails” plugin and let it run through and make all the appropriate thumbnails.

    Good idea. When I start “Ajax Thumbnail Rebuild”, though, it still lists

    yarpp-thumbnail (120×120 cropped)

    So I went and changed the width to 190 in the class-core.php (which does not feel right because it will be overwritten by future updates).

    That did the trick. Thanks a lot for your advice!

    Is there a way to maintain this change throughout future versions?

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘How to stop YAARP creating thumbnails’ is closed to new replies.