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
281 stars 83 forks source link

Thumbnail - first image, there is a problem with an address (src) #145

Closed tonyAndr closed 7 years ago

tonyAndr commented 7 years ago

When I'm trying to get fisrt image as a thumbnail in the side widget, I get placeholder instead.

The reason is that my html code looks like this: <img src="/wp-content/uploads/YY/MM/img.jpg" /> I don't use full address of an img.

Some posts have full src with domain like

<img src="http://site.com/wp-content/uploads/YY/MM/img.jpg" /> and thumbnails work fine with them.

How can I fix this issue? Most of my posts don't have full address and I'm not gonna change them all manualy.

cabrerahector commented 7 years ago

Hi there!

When retrieving the thumbnails WPP expects the full URL -as you already noticed- because this is the standard behavior in WordPress. Yours is an edge-case so it's not really an issue caused by WPP.

With that being said, here are a couple of ideas to work around the issue:

tonyAndr commented 7 years ago

Yeah... Anyways nice plugin, so probably I'll convert them. Thanks for the query.