WordPress.org

Ready to get started?Download WordPress

Forums

Related Posts Thumbnails
Won't use images from CDN, loads local files only. (10 posts)

  1. Andrew
    Member
    Posted 2 years ago #

    Hi marynixie,

    I'm using the latest versions of WP, MaxCDN, W3Total Cache and your related posts thumbs plugin.

    Everything works fine, post images, style sheets etc... except the thumbnail images shown are always the local version, never the version on the CDN.

    Everything else is working from the CDN fine, the thumbnails appear to be uploading the to CDN also, as if I manually enter the URL of where a thumbnail would be on the CDN it loads fine.

    The plugin on the site continually loads the local version though.

    Any thoughts?

    Thanks in advance.
    Andrew

    http://wordpress.org/extend/plugins/related-posts-thumbnails/

  2. Frederick Townes
    Member
    Posted 1 year ago #

    Are you logged in? What is the path that that plugin is using? Was it added to the custom file paths setting on the CDN settings tab?

  3. andrewk1234
    Member
    Posted 1 year ago #

    Hi Frederick,

    To answer your questions...

    It made no difference being logged in or not.

    Thumbnails were in standard image location, where other body images were located which worked fine with CDN.

    Added the custom files paths which made no difference.

    After much search elsewhere and not finding a solution, I coded the related thumbs function directly into my theme which now works.

    I had the problem across multiple sites/separate installs, and from googling found others with the same problem and no solution.

    I've since un-installed the plugin so done have access to it for further troubleshooting. Hopefully the above is enough information is of some use to you for future troubleshooting though?

  4. Frederick Townes
    Member
    Posted 1 year ago #

    If you temporarily change to twenteleven and deactivate all other plugins does the problem persist?

  5. johnibom
    Member
    Posted 1 year ago #

    Having the same issue, anyone have the solution for this problem?

  6. johnibom
    Member
    Posted 1 year ago #

    Interesting!

    Related Post plugin prints the images as background image if I print them in img tag the url gets replaced!

    on line 333:
    $output .= '<div style="border: 0pt none ; margin: 0pt; padding: 0pt; background: transparent url(' . $url . ') no-repeat scroll 0% 0%; -moz-background-clip: border; -moz-background-origin: padding; -moz-background-inline-policy: continuous; width: ' . $width . 'px; height: ' . $height . 'px;"></div>';

    I replaced it with:
    $output .= '<img src="' . $url . '" width="' . $width . 'px" height="' . $height . 'px;" />';

    And it's working perfectly!

    The Author prefers to print the images as background image for many reasons, would be better if the background images will get replaced!

    Basically it's the problem of W3TC plugin not the related post plugin.

    So I request @Frederick Townes to come up with a patch!

    I hope it helps!
    Thanks

  7. Gashe
    Member
    Posted 1 year ago #

    Hello,

    I am having the same problem, black thumbnails constantly loading.
    @johnibom, can you please explain a little bit how to make this workaround, i am not into programming :)

    Thanks!

  8. johnibom
    Member
    Posted 1 year ago #

    Hello,

    @Gashe Please open "related-posts-thumbnails.php" in a text editor and follow the code I posted above.

    I hope it helps!

    Thanks

  9. Gashe
    Member
    Posted 1 year ago #

    Thank you for the replay johnibom
    I searched for the file "related-posts-thumbnails.php" but anything similar that i could find is "post-thumbnail-template.php" and there aren't the lines that you mentioned in your previous post.

    Any other suggestions?

    Thanks for your help!

  10. Frederick Townes
    Member
    Posted 1 year ago #

    Using latest version if the paths start with '/' the replacement is done correctly. Example:

    <style>#main { background:#ffffff url(/wp-content/themes/twentytwelve/dummy1.png no-repeat right top; }</style>
    <div style="background#FFF url(/wp-content/themes/twentytwelve/dummy1.png) no-repeat right top">

    So changing the original plugin to use such paths might be better if its still an issue. No posts in this thread writes how the paths actually look like.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic