How to remove responsive images from WordPress theme

Today one of our client, a photographer, asked – when I upload images to my website (running wordpress), my images appear with poor quality. As photographer, it is critical for me to present them with as good quality as I can, many agencies and magazine editors are visiting my website from mobile devices and they see them … (you can end up the story youself).

Anyway, I checked and concluded, that my customer was right. When resizing browser at some point photo changed to slightly lower quality and for some reason – not just in size – but also colors became less vibrant. Believe me – that looked weird!

I googled, looked up the source code, checked theme and installed plugins and figured out, that it was some WordPress feature, described here: Responsive Images in WordPress 4.4.

There is no option in WordPress itself to disable it.

If you want to disable, you can search for some plugin or just add the following lines at the very end of wp-config.php file:

// disable srcset on frontend
add_filter('max_srcset_image_width', create_function('', 'return 1;'));

That’s it! 🙂