Our default site configuration uses a CDN for our insecure media URLs and no CDN for our secure media URLs. This is how things should work the majority of the time, but we have a case that needs to explicitly retrieve insecure URLs despite normally being a secure request.
The code which returns the URLs is using the product and the image helper to return resized versions of the media gallery:
foreach ($product->getMediaGalleryImages() as $image) {
$imageUrl = (string) Mage::helper('catalog/image')
->init($product, 'image', $image->getData('file'))
->keepFrame(false)
->constrainOnly(true)
->resize($imageSize);
$imageUrls[] = $imageUrl;
}
What's the best way to return resized insecure product gallery image urls?