Archived topic
Page header image not showing up?
5 replies · Started by Jen Carlstrom on February 19, 2016
I'm trying to put a header image on my blog. The url is correct, the image is uploaded, but the image is not displaying on the blog (I see a broken-image box where the image should be)
The code that's causing the image not to display is:
<img width="1400" height="560" src="https://emily.blogs-dev.wesleyan.edu/files/2016/02/image-1.jpg" class="attachment-full size-full" alt="image-1" srcset="http://emily.blogs-dev.wesleyan.edu/files/2016/02/image-1-300x120.jpg 300w, http://emily.blogs-dev.wesleyan.edu/files/2016/02/image-1-768x307.jpg 768w, http://emily.blogs-dev.wesleyan.edu/files/2016/02/image-1-1024x410.jpg 1024w, http://emily.blogs-dev.wesleyan.edu/files/2016/02/image-1.jpg 1400w" sizes="(max-width: 1400px) 100vw, 1400px" />
It's the "srcset" part of things that's causing the image not to display. I know, that "srcset" thing is probably there for the sake of responsive images, and it's probably looking for files that don't exist, such as "http://emily.blogs-dev.wesleyan.edu/files/2016/02/image-1-768x307.jpg"
Trouble is, what if I don't want to create and upload these images? Can we just override this, or can we cut the number of images that "srcset" uses? Really, I'd just like "https://emily.blogs-dev.wesleyan.edu/files/2016/02/image-1.jpg" to display on the page at all resolutions.
Is there some documentation I'm missing or some other obvious thing that I've overlooked?
WordPress should create those images as the srcset functionality is core behavior.
This plugin will remove that functionality from WP: https://wordpress.org/plugins/disable-responsive-images/
The images exist, but everything following "srcset" breaks the image.
When I remove srcset = "", my image displays fine. Is there an issue with how your code is handling the responsive images?
What steps do GeneratePress users ordinarily take to succeed in getting that header image to display as something more than a broken image? If there's documentation available on this, I'm not succeeding in finding it - please help in pointing me in the right direction.
Hi there,
GP doesn't do anything special to handle responsive images - it allows WordPress to take full control and do what it needs to do.
For most people the WordPress functionality works, but for some it seems to break things. It's new in WordPress 4.4 so I'm assuming these bugs will be fixed.
If you Google "WordPress srcset broken" you'll see some discussions on it.
thank you!
No problem :)
