Typically images added through the asset manager in Preside will render dynamically. This is great if you need to restrict assets to users for instance being logged in, but in the majority of cases this is just adding extra strain and response time to your site, as every single image on the page is a separate request in Preside.

Making these images into static URL's is actually pretty simple. 

This is an example of a dynamic URL

https://www.wsg-media.com/asset/E60ADBEE%2D15FD%2D46A1%2D91CD7C6D221FC109/leftFullImage/a23e0ff4f6f9905d799315a56f3f9172/

and then this is the static version of the same image:

https://images.wsg-media.com/uploads/assets/derivatives/leftfullimage_a23e0ff4f6f9905d799315a56f3f9172/e60adbee-15fd-46a1-91cd7c6d221fc109.jpg

So to get this rolling

1) Preside config

First off, you'll need to add a few lines into your config.cfc, this is what i've got setup here


settings.assetmanager.storage.public = ExpandPath( "/uploads/assets" );
settings.assetmanager.storage.private = ExpandPath( "/uploads/private");
settings.assetmanager.storage.publicUrl="https://images.wsg-media.com/uploads/assets";

The public & private storage locations needs to map to physical locations, and these are the default settings. The publicURL is really where the action is, and this can pretty much be anything you like, but you're going to have to back it up with making some web server changes

2) Create a new site/mapping

Creating a new site isn't strictly necessary but this is what i've done here, oh and don't judge me, but i'm running this site on IIS currently.

In IIS create a new site, put the host name as a sub-domain. Create a virtual directory that matches what you set in the publicURL in your config that maps to the physical location of where the assets are stored [website]\uploads\assets

 

And that's all there should be to it. The first time the image will render it will probably still use the old image url, but subsequent uses will render as your static location.