Title: How to remove srcset when calling image
Last modified: August 31, 2016

---

# How to remove srcset when calling image

 *  [muchmuch11](https://wordpress.org/support/users/muchmuch11/)
 * (@muchmuch11)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/how-to-remove-srcset-when-calling-image/)
 * On latest wp update, calling an image for thumbnail will automatically calling
   its srcset as well, how to remove it? what filter or other PHP code I have to
   put on function.php?
 * Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)

 *  [Rajesh Soni](https://wordpress.org/support/users/rajeshsoni/)
 * (@rajeshsoni)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/how-to-remove-srcset-when-calling-image/#post-6906902)
 * > calling an image for thumbnail
 * Please elaborate in detail, what exactly are you referring to?
 *  Thread Starter [muchmuch11](https://wordpress.org/support/users/muchmuch11/)
 * (@muchmuch11)
 * [10 years, 5 months ago](https://wordpress.org/support/topic/how-to-remove-srcset-when-calling-image/#post-6906942)
 * find the solution. it’s already on another thread here
 * > add_filter( ‘max_srcset_image_width’, create_function( ”, ‘return 1;’ ) );
 * you can mark it as solved! thanks
 *  [Jeshil](https://wordpress.org/support/users/jeshil/)
 * (@jeshil)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/how-to-remove-srcset-when-calling-image/#post-6907211)
 * This did not work for me. I am using WordPress 4.5.3
    The srcset does go away
   after adding this to functions.php
 *  Moderator [Steven Stern (sterndata)](https://wordpress.org/support/users/sterndata/)
 * (@sterndata)
 * Volunteer Forum Moderator
 * [9 years, 10 months ago](https://wordpress.org/support/topic/how-to-remove-srcset-when-calling-image/#post-6907212)
 * see this:
 * [https://make.wordpress.org/core/2015/11/10/responsive-images-in-wordpress-4-4/#comment-28662](https://make.wordpress.org/core/2015/11/10/responsive-images-in-wordpress-4-4/#comment-28662)
 *  [Jeshil](https://wordpress.org/support/users/jeshil/)
 * (@jeshil)
 * [9 years, 10 months ago](https://wordpress.org/support/topic/how-to-remove-srcset-when-calling-image/#post-6907213)
 * This code does not work for me, the srcset is still there. My original uploaded
   images are very big and need not to be streched, however for the gallery images
   in single product view a very small image is used in srcset and I don’t know 
   from where it is picked up, the source dimensions used for this image are not
   specified anywhere.
    As a workaround it only got better when i increase woocommerce
   product display image size to 1000 x 1200 and regenerating thumbnails

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘How to remove srcset when calling image’ is closed to new replies.

## Tags

 * [php](https://wordpress.org/support/topic-tag/php/)
 * [srcset](https://wordpress.org/support/topic-tag/srcset/)
 * [thumbnail](https://wordpress.org/support/topic-tag/thumbnail/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 4 participants
 * Last reply from: [Jeshil](https://wordpress.org/support/users/jeshil/)
 * Last activity: [9 years, 10 months ago](https://wordpress.org/support/topic/how-to-remove-srcset-when-calling-image/#post-6907213)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
