Not easily.. The URL of the images are replaced by the upload markdown for the local image. You would need to revert to the version before the URL was replace by the image, and then after a while, Discourse will delete the images that are no longer referenced in a post.
Most sites really don’t want broken images, so the download option is what most peoplel use.
You can find those with
PostRevision.where("modifications like '%downloaded local copies of images%'")
Writing code to revert all of those posts is left as an exercise for the reader. ![]()
It should be just a couple of lines of code, but I don’t know what they are without looking at the code.