Interesting approach, good luck! Admittedly I'm not sure if many users want to take their media uploading in their own hands and pay for it but maybe I'm wrong. Where are the images stored? Do you have your own hardware? Backups etc?
Also since you're interested in Fediverse media storage, I recently read about https://jortage.com/ It's a third party storage for your instance with deduplication, pretty interesting idea. Takes away a bit of the federated part though
This should be possible, in nginx you would just have near identical entries that deliver the same content. The service itself sometimes takes a domain to build internal links etc, and those usually only take one.