cabrerahector / wordpress-popular-posts

WordPress Popular Posts - A highly customizable WordPress widget that displays your most popular posts.
https://wordpress.org/plugins/wordpress-popular-posts/
GNU General Public License v2.0
279 stars 83 forks source link

Responsive img-Tags with secondary Retina image #269

Closed atomtigerzoo closed 3 years ago

atomtigerzoo commented 4 years ago

Thank you very much for your plugin and the time shared ✨

Would it be possible to integrate a retina version of each image (2x the size of the original image created) into the process? It would be nice to have a fallback for high DPI screens in the image tag produced.

Like: <img src="some-image.jpg" srcset="some-image-2x.jpg 2x" alt="" class="wpp-thumbnail wpp_featured wpp_cached_thumb" width="226" height="226">

Or just use the original get_the_post_thumbnail() method instead?

cabrerahector commented 4 years ago

Already working on that (but don't tell anyone ;))

For the time being as a workaround you can tell the WPP widget to use the "stock" WordPress thumbnails which do provide retina support (go to Widgets > [Your sidebar] > WordPress Popular Posts > Post Settings > Display post thumbnail > Use predefined size).

atomtigerzoo commented 4 years ago

Good news 💯

I am not using any widgets by now, just the template-tags so I will wait. I'm in no hurry and neither should you :) Thank you for your reply!