Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8299653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T16:13:52+00:00 2026-06-08T16:13:52+00:00

Am trying out ImageResizer and am looking for a good method to dynamically Authorize

  • 0

Am trying out ImageResizer and am looking for a good method to dynamically Authorize user access to images(and other files) based on role, group etc thus restricting image access. I read that ImageResizer support Url Authorization, but unsure to wich extent(only that if i implement it will follow or there are helpers for this). Preferably a soultion that would work with their disk cache module as well. Seen some generic information regarding implementing custom url authorization, but unsure if its just a matter of setting up authorization for the image paths as one would any other resource then let imageresizer work against that. Or if some logic should e connected to imageresizer. Found some nfo here regarding url authorization in general but i guess that im not the first about to implement this combination?

The optimal setup as i see would be a restriction where no files (thumbs, images, cached images or otherwise) would be available online if authentication havent granted access.

So looking for more info / details regarding a sound and decently secure implementation of this, perhaps sample implementation / code of this exists somewhere i havent found?

Edit: Computer Linguist link gave me much of what i was looking for. Two things struck me though.
1. Is there any best practises redarding what should go in a event handler or i can just build a service for this specific purpose and make use of it in the handler?
2. Since this will be triggered for every image i guess that avoid doing direct dbcalls for permission checks(ie try to device a method of caching the permissions for the respective user)? Or the practicle implications of this are usually so small that it doesnt matter? When thinking of it, does User.IsInRole not do direct dbcalls for determining membership?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T16:13:55+00:00Added an answer on June 8, 2026 at 4:13 pm

    You’re over-thinking this.

    ImageResizer applies identical security to both source files, results, and cached images.

    It follows the URL Authorization rules, but permits you to have complete control over all image authorization via the Config.Current.Pipeline.AuthorizeImage event.

    Handle that event, and you have access to all request data imaginable, and you can set the event AllowAccess variable to permit or deny the request based on any logic you desire. This event occurs after all URL rewriting has taken place, so this is the most accurate place to do authorization if your rules are based on physical file path instead of visible path.

    Also, any generic AuthorizeRequest-level work you do will be respected by ImageResizer, as it doesn’t activate until PostAuthorizeRequest.

    ImageResizer events: http://imageresizing.net/docs/events

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

While trying out an experimental UINavigationController-based iPhone application, I ran into a problem when
Just trying out a couple of Android samples. Struggling to find the method managedQuery
I am trying out JSLint on some of the javascript files in our projects
I trying out Django's class based views (CBVs). class BlahView(TemplateView): template_name = 'blah/blah.html' def
Im trying out the codebook method, but don't really understand the point of int
Was trying out some code with the EF code first method and ran into
I was just trying out the java.util.Calendar method getActualMaximum() to see if I can
Trying out the example usage of codebrew rails-backbone , everything works fine but the
Trying out the examples found on pleac.sf.net , I'm not able to get an
Im trying out the banking sample application and when i try to add or

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.