• Resolved vihanchaudhry

    (@vihanchaudhry)


    Hello,

    I’m fixing an old website. I installed SSL certificate and set up HTTPS redirect, but somewhere in that process, somehow managed to break all the post thumbnails.

    Thumbnails are still being generated (they exist in the database and display fine in Media Library), but show up as broken links on the website and in the dashboard. example

    Upon inspecting the img tag, the img src is wrong. src(unknown) is what it says in most cases, though in some cases there is a random url in the src (e.g. src=”domain.com/gallery”). example

    However, clicking Edit on an individual post, I am able to see the featured image in the right side column.

    So far I’ve tried:
    – Deactivating most plugins
    – Changing wp-content/uploads folder permissions
    – Using the Regenerate Thumbnails plugin
    – Purging caches

    I’d appreciate any help I can get,
    Vihan

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Steven Stern (sterndata)

    (@sterndata)

    Volunteer Forum Moderator

    What steps did you take to make your site work via https? Did you modify the database in any way?

    Thread Starter vihanchaudhry

    (@vihanchaudhry)

    I added these lines to the .htaccess file:

    RewriteEngine On
    RewriteCond %{HTTPS} off
    RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

    I also added this to wp-config.php:
    define('FORCE_SSL_ADMIN', true);

    And I installed and activated the plugin Really Simple SSL.

    Hi @vihanchaudhry,

    I noticed that in the src of these images, there is no URL at all, or in some cases, just the home_url. This means the cause of the broken images is not redirection, or SSL as such, but that the code that is handling these images is having issues when on SSL.

    Either the php script that is generating the src is not functioning, or the source should be generated by a javascript and the javascript is not working.

    Do you maybe use a lazyloading plugin, or a caching plugin? If you have a re

    I would start with deactivating all optimization, lazyloading and caching plugins. It is also possible this, in combination with hot link protection on your server is causing issues.

    Thread Starter vihanchaudhry

    (@vihanchaudhry)

    @rogierlankhorst I just deactivated Autoptimize, W3 Total Cache, and Post Types Order and it didn’t seem to help. I don’t believe there’s any lazyloading on the site.

    I don’t know where to even begin looking for the php script that is generating thumbnail src. Seems like a theme issue if I’m not mistaken?

    UPDATE: I FIXED IT! I decided to figure out where the theme came from. Apparently it’s a fork of a theme called FitPro so I simply googled for SSL-related thumbail issues with FitPro and immediately came upon this thread:

    Pls make sure the WordPress Thumbnail Generation in Theme Options->General tab is set to WordPress. That should resolve the issue. The Aqua thumbnail generation does not work well with SSL.

    This solved it for me. Thank you @sterndata and @rogierlankhorst for helping me narrow down the issue!!

    • This reply was modified 5 years, 6 months ago by vihanchaudhry. Reason: resolved
    • This reply was modified 5 years, 6 months ago by vihanchaudhry.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Post thumbails broken since installing SSL’ is closed to new replies.