• Resolved Martin Bailey

    (@martin_bailey)


    Since moving to LiteSpeed Server and the LiteSpeed Cache Plugin a few weeks ago, I have been seeing problems with the Featured Image not being recognized by Facebook when I post notifications of new articles.

    Today, I tried turning off the CDN and flushing my caches, and after I did so, Facebook had no problems with the images. This led me to find another curious issue which I think might be behind this.

    I noticed that images that I am embedding into posts since switching to LiteSpeed and your plugin all seem to be being embedded with the full URL including the cdn subdomain. In earlier posts, when I click on an image and check it’s URL, the media is linked from my domain https://martinbaileyphotography.com/ but for the last few posts, the images are being linked from https://cdn.martinbaileyphotography.com/ including the cdn subdomain.

    I believe this is not how this should work, and what is causing the problems with my featured images on Facebook. The major issue I see with this is that I might at some point stop using a CDN or have to turn it off for troubleshooting, but if the images embedded in my posts are hard-coded with the subdomain, the images will not load under these conditions.

    Also, of course, I cannot be turning my CDN on and off each week to trick Facebook into correctly including my images, and I will also have broken images whenever anyone else links to my posts, and it looks terrible.

    For your reference, here is a link to the fb developer website for a post that still has the problem: https://developers.facebook.com/tools/debug/sharing/?q=https%3A%2F%2Fmbp.ac%2F669

    So, I want to ask, is this the way that embedding images is intended to work with LiteSpeed Server and your plugin? If it is, do you not see this as an issue? Are other people not having problems also? If it is not, can you think of a reason why my blog is working this way since I started to use your plugin?

    Regards,
    Martin.

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

Viewing 11 replies - 16 through 26 (of 26 total)
  • On LiteSpeed Cache > Debug Page you will see the Try GitHub Version option.

    View post on imgur.com

    If you cannot see that page, please active debug option on LiteSpeed Cache > Setting > Debug > Debug Log [ON]

    Thread Starter Martin Bailey

    (@martin_bailey)

    Sorry for the delayed reply. I didn’t see a notification of your reply, and was reminded of this issue when I released this week’s post and had the same issue over on Facebook. ??

    I just followed your instructions and updated to that commit without issues, but my post was already created and published by this time. I did a regex search and replace to get rid of the cdn.martinbaileyphotography.com urls from my post, and cleared the cache, but the Facebook issue is still occurring, as you can see here:

    https://developers.facebook.com/tools/debug/sharing/?q=https%3A%2F%2Fmbp.ac%2F671

    I’m not sure if this is because I upgraded after creating the post or not. But the OG:image is still coming from the cdn, and I don’t really know what to try next.

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    If you disable CDN , it works fine?

    I noticed that even bypass LSCWP , the image still serves via CDN.

    If this post is published before , the URI may already stored in database.

    Could you please try backup the database and replace these CDN URI to origin URI and try again ?

    Best regards,

    Thread Starter Martin Bailey

    (@martin_bailey)

    OK, so I tried disabling the CDN again, but it did not work. I’m not sure why it worked last week, but it no longer affects the Facebook OG:Image.

    So, I did another regex search and replace but this time on the Post Meta Data, and found another few URLs that were in the database with the cdn subdomain, so I got rid of all of those as well.

    Now Facebook recognizes the Featured Image via the OG:Image metadata, and all seems fine.

    The final test will be next week when I release another post. If the fix that I applied after releasing yesterday’s post is valid, this issue will be resolved.

    I’ll keep you posted. Thanks for your help and patience.

    Regards,
    Martin.

    Thread Starter Martin Bailey

    (@martin_bailey)

    So, I just released this week’s Podcast and unfortunately it seems that the code I updated to last week was not effective in fixing this issue.

    The Facebook Developers page is still giving me the Image Unavailable error: Provided og:image, https://cdn.martinbaileyphotography.com/wp-content/uploads/2019/08/Cover_Shot.jpg could not be downloaded. This can happen due to several different reasons such as your server using unsupported content-encoding. The crawler accepts deflate and gzip content encodings.

    Using a plugin called Search Regex, I searched for https://cdn.martinbaileyphotography.com/ and did not find it in any of my post entries, but like last week, the Post Meta Value table has around 30 posts with featured images, including this week’s post’s featured image, that were all linked using the https://cdn.martinbaileyphotography.com/ URL. I did a search and replace on these last week too, so it would seem that these are being overwritten by something.

    I just executed the search and replace, so that it actually made the changes in the Post Meta Value table, and the facebook error went away again.

    Is the cdn URL supposed to be saved in the Post Meta Value table?

    Regards,
    Martin.

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    It should not save CDN in database , I have reported this to dev to further check.

    the last week commit was to address that image link in editor page.

    Do you have any idea why it sometimes fails and sometimes won’t fail ?

    Because if I do https://developers.facebook.com/tools/debug/sharing/?q=https%3A%2F%2Fmartinbaileyphotography.com%2F2019%2F07%2F24%2Fcomplete-namibia-tour-2019-travelogue-4-podcast-669%2F

    right now , it doesn’t give me error.

    Best regards,

    Thread Starter Martin Bailey

    (@martin_bailey)

    Hiqtwrk,

    It didn’t fail when you checked, because I’d run the search and replace, and the post was still using https://martinbaileyphotography.com/ without the cdn subdomain.

    However, I just came to share my latest post on my social networks, because it wasn’t working yesterday, and once again, I found everything broken, so I did the regex search/replace again, and found 24 posts had already been updated in the database, to use the https://cdn.martinbaileyphotography.com/ URL for the featured image.

    Something is gradually working through posts in the background and changing this, but I don’t have a clue what. All I know is that this started when I switched to from Apache/Nginx to the LiteSpeed Web server, and started using you LiteSpeed Cache plugin for the CDN settings. I’d been using WP-Rocket until that point.

    I can’t say for sure that it’s your plugin that is at fault, but it would be a big coincidence timing-wise if it wasn’t.

    My concern is that it’s not only me that is sharing my posts on the social networks, and pretty much all other shares will also be without the Featured Image and that looks really bad from a marketing perspective.

    Regards,
    Martin.

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    Yes, that database with CDN URI has been reported to devs and working on fix.

    Best regards,

    Thread Starter Martin Bailey

    (@martin_bailey)

    Hi Team,

    So, things are gradually getting worse. I think I recall seeing a fix earlier this week referencing my user name, but A) the featured photo links are still gradually being changed to the cdn subdomain in the post meta table, and B) I just published this week’s post, and even after using Search Regex to change the cdn subdomain back to my sites URL, I’m now getting the og:image error permanently. See here: https://developers.facebook.com/tools/debug/sharing/?q=https%3A%2F%2Fmbp.ac%2F673

    If I disable the CDN in the LiteSpeed Cache plugin, the og:image problems does not occur.

    Regards,
    Martin.

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    I’m sorry I don’t know why it is being marked as solved.

    Please submit a ticket here and we will keep investigate it.

    Best regards,

    Thread Starter Martin Bailey

    (@martin_bailey)

    Hi qtwrk,

    OK, I’ve just done that.

    Regards,
    Martin.

Viewing 11 replies - 16 through 26 (of 26 total)
  • The topic ‘Image Linking and Facebook Issues with CDN Turned On’ is closed to new replies.