radiospiel / imgio

An image asset resizer along the lines of sencha.io
25 stars 1 forks source link

Add support to rewrite img tags #6

Open radiospiel opened 12 years ago

radiospiel commented 12 years ago

If we build imgio into a middleware, we could provide support to automatically rewrite image tags like so. From:

<img width="120" height="240" src="http://domain.com/an/image.png"> 

into

<img width="120" height="240" src="http://<myimageioserver>/120/240/http://domain.com/an/image.png"> 
Overbryd commented 12 years ago

That is a great idea. It yields some questions:

I think it would be great to rewrite images that have special markers like a class="cdn". To think this a bit further, I'd propose the following middleware-stack:

⇅ imgio
⇅ img-rewriter
⇅ An application