• Resolved iantm5150

    (@iantm5150)


    I would love to be able to use the URL of the featured image without the dimensions added to the filename.

    For example – If I set the size to be 300 x 300 px in the widget settings, it would add -300×300 to the end of the filename.

    myfilename-300×300.jpg would be myfilename.jpg

    I tried finding out where to do this in the wordpress-popular-posts.php file, but I can’t seem to get it to work..

    Thanks in advance for your help, great plugin!

    https://wordpress.org/plugins/wordpress-popular-posts/

Viewing 1 replies (of 1 total)
  • Thread Starter iantm5150

    (@iantm5150)

    I ended up using Jquery to remove that piece of the end of the file URL. Seems to work fine. Here is the script if anyone needs it. This works if you set the size of the thumbnail to be 10×10.

    $(document).ready(function(){
    	 $("img").each(function() {
    	   var imgsrc = $(this).attr('src');
    	   var imgsrc = imgsrc.replace("-10x10","");
    		$(this).attr('src',imgsrc);
    	  });
    });
Viewing 1 replies (of 1 total)
  • The topic ‘Remove thumbnail sizing – just use default’ is closed to new replies.