Is it possible to revert the
download remote images to local option?
I turned it off, but I have lots of posts where I dropped a news link in a post, and the remote image was downloaded to my forum, as expected. However, perhaps this is a bad strategy looking long term. Most news we forget about the next day, so why keep the images long term?..
Anyway, I turned off the feature, then
rake posts:rebake hoping the onebox images would revert to the source link. No dice. The onebox images are still using the downloaded image from the forum instead of the source link.
Is there a way to make the forum forget about the previously downloaded images? I would have thought a rebake would cause the onebox to use the source image.
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.
If the reader even wants to attempt such an endeavor!
Thanks Mr. Jay!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.