Closed iurisilvio closed 10 years ago
You again?! I love it.
Seems like a good idea. I'm not immediately familiar with any hooks in url_for
for custom logic. Do you have a page I can look at?
Cheers!
You just have to mount a blueprint with these routes (resize
, crop
, fit
based in my initial idea).
I'll make a pull request to this one soon.
It is the way Flask do the magic.
url_for('images.resize', filename='/path/to/file.png', width=80)
You can even define the
mode
based on routes:images.fit
,images.crop
, ...It is good because I can migrate from
url_for('static', filename='/path/to/file.png')
in a really easy way.