Question with Content Provider, Custom Image Url

Posted by Community Admin on 04-Aug-2018 14:08

Question with Content Provider, Custom Image Url

All Replies

Posted by Community Admin on 11-Apr-2013 00:00

I'm a bit new to Sitefinity development, and am looking for where to start. So basically I would like the images in my site to be served from a different sub-domain. 

So when it renders out the link for Images, it renders them from content.mysite.com/.../home.png
instead of /Images/headergraphics/home.png?sfvrsn=4. The original link still needs to work, however when it's rendered to the page, i would like it to change the sub-domain. 

Any help would be appreciated. 

~Brad

Posted by Community Admin on 16-Apr-2013 00:00

Hi Bradley,

 Thank you for contacting us.

With the current configuration settings this is not possible. Could you inform me what functionality you are trying to achieve by having media served from a sub domain but still remaining on the same site? Perhaps I could help you resolve your issue as a whole.

I look forward to your reply.

Greetings,
Patrick Dunn
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 16-Apr-2013 00:00

Patrick, 
Thank you for your reply, What i have is an Edge CDN (content.mysite.com) that draws it's content on a request basis from www.mysite.com. So when requesting images i want the url in the rendered content to be from content.mysite.com but when the cdn requests it, it needs to be available from the original url...

Example: 
www.mysite.com/Images/Image1.png would be the library location, but when rendered to the page the tag would be:
<img src="content.mysite.com/.../Image1.png">

Any help you can provide would be of great assistance. 
Thanks
Brad

Posted by Community Admin on 17-Apr-2013 00:00

Hi Bradley,

 There is no setting to move the images to CDN yet although it is in discussion to start providing out of the box support for some popular CDNs.
Since Sitefinity 4.4 we have supported windows Azure blob storage where the images can be uploaded, but there is no support for Amazon. In case this can be useful to you to create a new storage provider for Azure go to Administration->Settings->Storage Providers and there you will see database and file system already existing with an option to add new storage provider for Azure. This is the first cloud storage provider we have added to Sitefinity, for the next release in mid February a new storage provider will not be introduced. Excuse us for the inconvenience. 

It may help in your situation that we have a blog post detailing how to connecting to amazon S3 providers. It's open source and the GitHub link is in the blog post.

Otherwise Sitefinity 6 will include additional cloud support but not for CDN like you may desire, however, it is on the list for a latter but undefined release.

I hope this helps and I apologize for any inconvenience this may cause.

All the best,
Patrick Dunn
the Telerik team
Do you want to have your say in the Sitefinity development roadmap? Do you want to know when a feature you requested is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Posted by Community Admin on 17-Apr-2013 00:00

Patrick, 
Thank you for the replay, I was actually able to do this by Inheriting the ImageControl and changing the logic that comes out of the ResolveMediaUrl method, simply checking for design time to make sure that it only uses the CDN when appropriate. 

Thanks for your help though..
~Brad

This thread is closed