Is there a way to prevent images from being served to unauthenticated users ?

Topics: ASP.NET 2.0
Aug 13, 2014 at 7:19 PM
Edited Aug 13, 2014 at 7:21 PM
Still using a very old (and slightly customized) version of BlogEngine.NET on a Windows XP (!) server so I'm a bit afraid to upgrade.

In the past, I have written a couple of extensions in order to grant or prevent access to static pages and/or posts based upon the users / roles and / or the post categories. For instance, I can prevent access to the blog from unauthenticated users, I can grant access to a subset of the blog (post categories) to users having the 'Readers' role, etc.

I noticed that images served by the image.axd handler are still accessible.

Is there an extension point available where I could add some logic to prevent access to images based on criteria such as authentication and/or users / roles ?