Post by sivak » Wed Aug 03, 2011 6:56 pm

As the title says I'm needing to serve my images from a different URL, in our case a Cloud Front link. Does anyone know where I can find or how I can over ride the code that is causing all of the image links to be absolute URLs? I've been digging for the last few hours to no avail (I have a feeling it's buried in the config files that I've been unable to decode) so any help would be greatly appreciated.

Just out of my own curiosity does anyone know if there was a code design decision that went into using absolute links for nearly everything in OpenCart?

Edit: This is OpenCart 1.5.0.5

Newbie

Posts

Joined
Wed Aug 03, 2011 6:22 pm

Post by SteveSherry » Thu Aug 04, 2011 5:38 am

This question has been asked several times in the forums, and i've never seen a direct answer.
I understand that it was designed this way.... but i don't fully see why there can't be an option.

My Website ¦ Summer Madness Special Offer ¦


Active Member

Posts

Joined
Thu Apr 08, 2010 7:47 am
Location - Wirral, UK

Post by sivak » Thu Aug 04, 2011 6:00 am

Well, I have a solution if I don't get an answer, it's just not very pretty. I'm finding it funny that URL settings are all so hidden but I can change just about everything else.

Newbie

Posts

Joined
Wed Aug 03, 2011 6:22 pm

Post by uksitebuilder » Thu Aug 04, 2011 7:00 am

I think the main problem/reason is that image resizing would not work if images were on a CDN (as it stands)

ImageImageImageImage

For Friendly Professional Support - Click Here


User avatar
Guru Member

Posts

Joined
Thu Jun 09, 2011 11:37 pm
Location - United Kindgom

Post by sivak » Thu Aug 04, 2011 7:09 am

uksitebuilder wrote:I think the main problem/reason is that image resizing would not work if images were on a CDN (as it stands)
I modified catalog/model/tool/image.php to account for that. When an image is resized a copy of it is sent to the CDN before the return. But yes, by default it's not accommodated. Though in LAMP stacks one of the tricks a lot of site's employ is to push images via a separate domain to allow for more concurrent downloads from a server. So even if you're not using a CDN there are good reasons to be able to have access to this.

Newbie

Posts

Joined
Wed Aug 03, 2011 6:22 pm
Who is online

Users browsing this forum: No registered users and 32 guests