2

Thanks for your attention! Ignore this question for now as it doesn't seem a length issue as I have just tried with a certain bunch of URLs that we are facing a problem with while not with another bunch. Will update the question above once I have more clarity.


Note: All links used in this post are hypothetical to explain the issue. Can't share actual links as the site is under development and confidential.

Suppose I try to post a shortened link in a facebook post such as http://tinyurl.com/j9w7uth, which translates to something like this: https://www.example.com/product-detail-page.html. The issue is the preview image. The preview image has a url that is being truncated. The error message while posting in facebook is such -

facebook error

This happens only with products, and only when the products have images that have been set up through Magento. If it is an external image, as mentioned above, with a url along the lines of https://d3v0wwxsdfl9f8.cloudfront.net/media/catalog/cdn/e823.jpg, there's no issue.

If the image has been uploaded through Magento (which only happens on product pages) the image will have a url along the lines of:

https://d3v0wwxsdfl9f8.cloudfront.net/media/catalog/product/cache/1/thumbnail/600x/17f82f742ffe127f42dca9de82fb58b1/e/l/e823.jpg

And facebook will truncate that url http://d3v0wwxsdfl9f8.cloudfront.net/media/catalog/product/cache/1/thumbnail/600x/17f82f742ffe127f42dca9de82fb58b1

This happens whether or not you use a url shortener, because the shortener does not shorten the preview image url. It shortens the url of the page, which has no problem.

Have read about facebook's handling of such issues when reported but did not want it all that encouraging, hence want to understand if there could be a way we could shorten the auto-generated URL and/or workaround this issue within Magento itself. If nothing is possible then will have to knock on fb's door.

0

For facebook issue,i am suggestion to be use Original image path instead of Cache image.

To understand the Cache Image & Origin checkout this link Get original image file from a cache URL

Cache image are temporary which is create basic of your requirement.If you flush Image cache from Magento admin then it will regenerate again.If You will use Original images then it will be good.Original image path is sort then cache images.

Hope this will resolved the issue

  • The URL is automatically picked up by facebook from the html content of the product page's link that we want to post. For performance factors it is important that we used image caching hence the URLs will be the cache URLs in the production environment. However, it doesn't seem a length issue as I have just tried with certain bunch of URLs that we are facing a problem while not with another bunch. Will update the question above once I have more clarity. – Shrenik Mar 26 '16 at 10:46
  • i did not got what are u telling ? – Amit Bera Mar 26 '16 at 10:49
  • For example if you post this hellolucky.com/birthday/hl-1193-blowout in facebook, then the image URL is going to be automatically taken by the facebook renderer from the html of the link shared. We cannot control the image URL being used. So whenever images are uploaded via magento the product pages shall have cache urls only. We cannot avoid or work around them. However, as I have stated the problem seems different from that of the length of the URL, hence kindly ignore this question for now. Thanks. – Shrenik Mar 26 '16 at 10:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.