I want to Link CDN URL to my Product in magento. So basically all the Images for the product will be fetched using the Image URL Rather than saving it on Magento Website (Project)

Is it possible to do so.?


If you want to set this for Products only, then you could create a custom product attribute, set the external link there. Customise the Product listing and details page to fetch image from the CDN link.

If you wanna fetch all your media from a CDN (content delivery network), you can tell Magento to use static files and media files from a CDN. Go to Stores > Configuration. Under the Web tab you can link the CDN in Base URL for Static View Files and Base URL for User Media Files. For more info about this aproach please refer https://magehit.com/blog/store-media-in-database-and-cdn-in-magento-2/

Hope it finds helpful.

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.