WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Popular Posts
[resolved] Thumbnails are missing if inserted manually (12 posts)

  1. kentwinder
    Member
    Posted 1 year ago #

    Hi Héctor,

    I haven't updated WPP for a while, because everything worked just fine. I don't remember the previous version of WPP that I used but I'm pretty sure it was the version that used another plugin to get the thumbnails.

    Yesterday I updated WPP to the latest version, everything works fine except for some posts that the plugin cannot get the thumbnails. When I checked I found out that images in those posts are not uploaded using Add Media function, but imported directly using <img /> tag, and the urls are from another hosting.

    This is my site: http://ipluszone.net/

    Thank you for your awesome plugin and your time, have a nice day,
    Kent

    http://wordpress.org/extend/plugins/wordpress-popular-posts/

  2. Héctor Cabrera
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Kent,

    Thanks for the report. Did you add these IMG tags to your posts' content?

  3. kentwinder
    Member
    Posted 1 year ago #

    Yes, when you view that single post, the first image is displayed correctly, but the thumbnail is the default no thumbnail image.

    Because I want to use default css class for my <img> like <img src="" class="myClass" />, so here's what I did to insert image into posts:
    Get image url from my other hosting
    OR
    Upload image using Add Media tool in posting panel, but I only get the full size image's url.
    Then add it to img tag

    Thumbnail in the first case is missing but the latter is displayed correctly.

  4. Héctor Cabrera
    Member
    Plugin Author

    Posted 1 year ago #

    I understand. Just to be sure, you did set Thumbnail source to First image on post on Settings > WordPress Popular Posts > Tools, right?

    I think your problem is related to this one since both reports state that using external images cause the issue. I'm already looking into it, so don't worry.

  5. kentwinder
    Member
    Posted 1 year ago #

    Yes, I already did it.

    I'm looking forward to the new update. Thank you for your time :)

    Have a nice day,
    Kent

  6. Héctor Cabrera
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Kent,

    A small update: I've uploaded a test version of the plugin here that hopefully should fix the issue with external images. Please, try it out and post your feedback here.

  7. kentwinder
    Member
    Posted 1 year ago #

    Hi Héctor,

    It still gets the local image,

    For example I have two posts with these two first images:
    http://ipluszone.net/wp-content/uploads/artworks/Girlfriend-Single1.jpg
    https://lh5.googleusercontent.com/-MJyCrQwUIuc/UC4NJ6VDboI/AAAAAAAAAKM/AbTqMXPCj1U/s600/She%20Wolf%20%28Deluxe%20Version%29.jpg

    The first one is display correctly, and one thumbnail is created like this:
    http://ipluszone.net/wp-content/uploads/artworks/Girlfriend-Single1-80x80.jpg

    But the second one is created like this:
    http://ipluszone.net/wp-content/uploads/artworks/12598_She%2520Wolf%2520%2528Deluxe%2520Version%2529-80x80.jpg

    I think there might be some mistakes while creating thumbnail.

  8. Héctor Cabrera
    Member
    Plugin Author

    Posted 1 year ago #

    The problem with the second image are the spaces and other invalid characters in the filename, but the plugin should also check for that when creating the thumbnail so thank you for the notice. I'll look into it as soon as possible.

  9. Héctor Cabrera
    Member
    Plugin Author

    Posted 1 year ago #

  10. kentwinder
    Member
    Posted 1 year ago #

    Hi Héctor,

    I have just checked the data, and the thumbnail is created, and you were right about the space and other special characters. This bug is like this:

    If I use this link for the image:
    https://lh5.googleusercontent.com/-MJyCrQwUIuc/UC4NJ6VDboI/AAAAAAAAAKM/AbTqMXPCj1U/s600/She%20Wolf%20%28Deluxe%20Version%29.jpg
    Then one thumbnail is created with the filename: 12598_She%20Wolf%20%28Deluxe%20Version%29-80x80.jpg, but somehow when I browse to the full url of that thumbnail http://ipluszone.net/wp-content/uploads/artworks/12598_She%20Wolf%20%28Deluxe%20Version%29-80x80.jpg, it will be changed to http://ipluszone.net/wp-content/uploads/artworks/12598_She Wolf (Deluxe Version)-80x80.jpg, and the thumbnail cannot be found.

    But if I change the link for the image into this: https://lh5.googleusercontent.com/-MJyCrQwUIuc/UC4NJ6VDboI/AAAAAAAAAKM/AbTqMXPCj1U/s600/She Wolf (Deluxe Version).jpg (the same image, just change encoded characters back to ASCII characters), and the thumbnail is created like this: http://ipluszone.net/wp-content/uploads/artworks/12598_SheWolfDeluxeVersion-80x80.jpg and everything works just fine.

    One more detail, all the special characters in upload folder of wordpress is changed to "-", but for some other hosting sites, they just encode the url

    Btw, why does this development version is slower than the final version? It takes a while to display the popular posts. But if I use the final versions, all the posts are display instantly.

    Thank you and have a nice day,
    Kent

  11. Héctor Cabrera
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Kent,

    The plugin seems slower because it has to download the external image(s) first (if it's not in your Uploads folder already) to create the thumbnail. The larger the original image is, the longer WPP will take to create the new thumbnail. After the thumbnail is created for the first time WPP will use the local copy instead, so everything should be faster.

    Another possible solution to avoid slowdowns is simply to resize the original image without creating the thumbnail, that way WPP won't have to download the full image - but in my experience this often results in distorted images.

  12. kentwinder
    Member
    Posted 1 year ago #

    Hi Héctor,

    Thank you for your time :)
    I think the problem is solved, looking forward to the final version :)

    Have a nice day,
    Kent

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags