I just deployed this application here with a new framework included, that does on-the-fly scaling and caching images that are stored as ERAttachment file system objects.
The image you see on this blog entry is scaled on the first request to it automatically, a new ERAttachment object created and stored in the database and cached there. Every size for an image is created only once, stored only once and after that is available as long as you don't delete the relevant ERAttachment.
Things that need to be done: