jimmynicol / ir-helper

Rails helpers for Image Resizer instances
MIT License
5 stars 1 forks source link

Adding new sources #2

Open jgillman opened 9 years ago

jgillman commented 9 years ago

I'm not quite sure how to add a new source for the helpers to parse correctly.

My assets are served from assets0.mydomain.com and assets1.mydomain.com. I've currently got image-resizer running on resizer0.mydomain.com.

I've got the following config:

IrHelper.configure do |config|
  config.cdn = "https://resizer0.mydomain.com"
end

I suspect this is already possible and I'm just doing it wrong, a working example in the readme could be helpful, too.

jgillman commented 9 years ago

To add a bit more background:

All of our assets (images, stylesheets, javascript, and pdfs) are served off of assets0.mydomain.com and assets1.mydomain.com. image-resizer won't pass through non-image files, so we have a separate CDN, resizer0.mydomain.com, which is specifically for image-resizer.