Title: Image SrcSet functionality bug?
Last modified: February 18, 2022

---

# Image SrcSet functionality bug?

 *  [jberg1](https://wordpress.org/support/users/jberg1/)
 * (@jberg1)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/image-srcset-functionality-bug/)
 * Hello,
    I’m having an issue with the image srcset functionality built into WordPress.
   The problem is if my full size image is tiny/40px X 40px (smaller than any of
   the small, medium, large images set under Settings->Media), WordPress still adds
   the srcset code for larger versions of the image (250px, 150px, 75px). Because
   WordPress doesn’t make thumbnails to enlarge an image uploaded, all those paths
   are not found. For example the filename-150×150 version doesn’t exist.
 * I found some browsers (mainly on retina) that try to use that srcset are showing
   a broken image because it isn’t there.
 * Is this a bug or is there a way to work around that? Maybe implement srcset only
   for images that are large enough to make all size versions of images in Settings-
   >Media.
 * For now I just disabled the srcset function.
    Thanks for any help or shedding
   light on this for me.
    -  This topic was modified 4 years, 3 months ago by [Jan Dembowski](https://wordpress.org/support/users/jdembowski/).
      Reason: Moved to Fixing WordPress, this is not an Developing with WordPress
      topic

Viewing 1 replies (of 1 total)

 *  Moderator [t-p](https://wordpress.org/support/users/t-p/)
 * (@t-p)
 * [4 years, 3 months ago](https://wordpress.org/support/topic/image-srcset-functionality-bug/#post-15377201)
 * See if info in this Code Reference points in right direction [https://developer.wordpress.org/reference/functions/wp_get_attachment_image_srcset/](https://developer.wordpress.org/reference/functions/wp_get_attachment_image_srcset/)
   
   [https://developer.wordpress.org/reference/functions/wp_calculate_image_srcset/](https://developer.wordpress.org/reference/functions/wp_calculate_image_srcset/)

Viewing 1 replies (of 1 total)

The topic ‘Image SrcSet functionality bug?’ is closed to new replies.

## Tags

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

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [t-p](https://wordpress.org/support/users/t-p/)
 * Last activity: [4 years, 3 months ago](https://wordpress.org/support/topic/image-srcset-functionality-bug/#post-15377201)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
