File tree Expand file tree Collapse file tree
cartridges/int_cloudinary_pd/cartridge/experience/components/assets Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,6 +76,7 @@ function generateBreakPoints(viewmodel) {
7676
7777module . exports . preRender = function ( context , editorId ) {
7878 var Logger = require ( 'dw/system/Logger' ) ;
79+ var URLUtils = require ( 'dw/web/URLUtils' ) ;
7980 var constants = require ( '~/cartridge/experience/utils/cloudinaryPDConstants' ) . cloudinaryPDConstants ;
8081 var currentSite = require ( 'dw/system/Site' ) . getCurrent ( ) ;
8182
@@ -96,7 +97,8 @@ module.exports.preRender = function (context, editorId) {
9697 viewmodel . cldTrackingParam = constants . CLD_TRACKING_PARAM ;
9798 if ( context . content [ editorId ] . imageLinkData ) {
9899 try {
99- viewmodel . imageLink = JSON . parse ( context . content [ editorId ] . imageLinkData ) ;
100+ const imageLink = JSON . parse ( context . content [ editorId ] . imageLinkData ) ;
101+ viewmodel . imageLink = URLUtils . https . apply ( null , imageLink ) ;
100102 } catch ( error ) {
101103 Logger . error ( 'Error while parsing JSON at {0} : {1}' , error . lineNumber , error ) ;
102104 }
You can’t perform that action at this time.
0 commit comments