XF 1.5 Remove broken images between IMG tag

dutchbb

Well-known member
Not sure if this is the correct section to post this question.

Would it be possible to do this with a sql query? I am uploading all images first so when done only broken images will be left between IMG tag.

For changing to URL (i set those to nofollow):

Code:
UPDATE xf_post SET message = REPLACE(message,'[IMG]','[URL]');

Code:
UPDATE xf_post SET message = REPLACE(message,'[/IMG]','[/URL]');


or

Deleting the tags with no replacement, if i am correct content between the tags will also be deleted with this. But you can end up with empty posts when only broken images where there?

Code:
UPDATE xf_post SET message = REPLACE(message, '[IMG][/IMG]', '')


An other option would be to replace the links between the tags with text like 'image removed'.

I have 170.000 broken images so this would be possible with this query i think like youtube tag replace.
 
Top Bottom