In general this is possible but if it is easy to achieve or not depends on how images are used across your site.
For example, do you have a central place where you store your images? Or are images always tied to pages and not used anywhere else?
Do you already use file uuids?
I proposed a per-page solution recently that could also be used across the site. Trying to find it again…
This only works for files that are stored somewhere in the content, not for files used indirectly your templates, and theses might often be thumbs, which would complicate the whole thing.