Chevereto is already prepared to do this since it allows you to use ID-based file naming. Problem is that you can't safely detect if an image is being embedded or accessed directly.
In theory, the only thing that you need is to detect blank referer but I noticed several false positives in this due to browser caches. Imgur possibly uses a custom tailored server which unfortunately we won't get anytime soon.