4

I am having two instances. One for Admin panel and One for Front end.

I am uploading from Admin panel instance and storing all the images to AWS S3 bucket. And I have created CloudFront (CDN) Distribution and also associated it with S3 bucket.

And now I am using CloudFront (CDN) URl and using for media URL.

It's loading all the images for Categories and CMS pages. But now loading images for product.

Will it be issue for Product image cache? On my S3 bucket, all the media images are there including cache images as well. But on Front end, it's showing that placeholder image only.

Ex: Actual image which is on S3 bucket and shows using CDN URL http://d23owmzqqamu40.cloudfront.net/media/catalog/product/cache/1/thumbnail/224x153/9df78eab33525d08d6e5fb8d27136e95/7/_/7.jpg

But when I am checking on front end, it loading placeholder image. URL: http://d23owmzqqamu40.cloudfront.net//media/catalog/product/cache/1/thumbnail/224x153/9df78eab33525d08d6e5fb8d27136e95/images/catalog/product/placeholder/thumbnail.jpg

Please help me if anyone have solution about the issue.

Thanks

1 Answer 1

1

The logic of loading a product image from the front-end involves Magento looking for /media/catalog/product images within the front-end instance. If there is an image within the instance, it will then try to create and load the cached version (at which point the CDN will come into play).

However, since the product images are uploaded to the backend - they won't exist in the front-end instance. magento then decided this product doesn't have an image and use placeholder image instead.

To counter this issue, what you need is a system script that sync/push the content of media folder from the backend to the frontend.

You might be looking for a solution like this

https://gist.github.com/alotaiba/913313

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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