The media handling is able to replace img tags with media embeds if the image in question already exists in the managed files table. What if it doesn't? In this case, we should be able to create a new managed file, and then reference that.

Essentially the code needs to be made smarter so that it can detect if the file already exists and if so, use that, or if not create a new one.

CommentFileSizeAuthor
#1 import_remote.patch514 bytesomerida

Comments

omerida’s picture

Status: Active » Needs review
StatusFileSize
new514 bytes

I needed this functionality, it wasn't too hard to implement, attached is a patch which does this.