Last Activity: 5 months ago
Provide a built-in ImageHandler
Your idea has been submitted and is awaiting moderation.
A lot of modules have the need to dynamically resize images on the fly. For example, forum avatars, blog profile pictures, even images posted in a news article module. Ideally, users would upload the correct image size optimized for the web, but of course we know this rarely happens.
I recently built a custom module and had to build a custom ImageHandler.ashx that accepted a file path, height, width and returned a URL to a web optimized image of the right size.
Then I discovered the core was kind of almost doing this with the ~/profilepic.ashx defined in web.config. Except this only accepts a UserID as a parameter.
Why not change this to be more generic? Instead of specifically focusing just on profile pictures, make it so it will accept any generic URL and then it can be reused by all module developers that need this kind of functionality.