I have a problem with a featured image. It’s a gif, but when I add it, WordPress adds the dimensions to the filename, which breaks the gif (since then it’s not really a gif anymore).

Is there a way to disable the addition of dimensions to the filename for only the featured image?

The link to my image is:
http://whatweblog.com/wp-content/uploads/2015/05/hue.gif
The link to my image after selecting it as a featured image is: http://whatweblog.com/wp-content/uploads/2015/05/hue-620x349.gif

I guess WordPress is making a thumbnail of my image, but I don’t want and need that, since I want the gif to be moving and on the front page.

I remember having no problem at all with this in the past, but now WordPress adds the dimensions, breaking the GIF in the process.

1 Answer
1

In addition to creating additional dimension, WordPress does keep your original image. Your original image is in this link http://whatweblog.com/wp-content/uploads/2015/05/hue.gif

So, instead of stopping WordPress from creating additional dimension, you should retrieve the full image when displaying the featured image. You can get the full image with this –

the_post_thumbnail('full');

In your case, change

<?php the_post_thumbnail('featured-image', array('class' => 'featured-full-width-top')); ?>

to

<?php the_post_thumbnail('full', array('class' => 'featured-full-width-top')); ?>

Remove Thumbnail Generation

See https://wordpress.stackexchange.com/a/91170/23214

Another easier option I think works is going to your Settings–>Media and setting each box for width and height to 0

Leave a Reply

Your email address will not be published. Required fields are marked *