XF 1.3 Automatically convert image URLs to BB Code IMG?

Mouth

Well-known member
#1
Is it possible to automatically convert pasted URL's for images to be within the [ IMG ] bb code?

Scenario: Whilst entering my thread/post text I also type/paste in the URL for an image, eg. http://site.com/images/123.jpg and rather than the URl become hyperlinked, have XF wrap it within [ IMG ] bb code tags (because it ended it jpg|png|gif) so that the image displays immediately (and new v1.3 image proxy can do its thang!)
 

AndyB

Well-known member
#2
That would be a great time saver. Of course if the image URL had the [ URL ] BB Codes surrounding it, then no automatic BB Code wrapping should occur.
 

Mike

XenForo developer
Staff member
#3
You can't rely on the apparent extension of a URL. You'd have to actually go retrieve the content to make any determinations about it.
 

Mouth

Well-known member
#4
You can't rely on the apparent extension of a URL. You'd have to actually go retrieve the content to make any determinations about it.
Agreed. But the extension would be a good 'trigger' for the action of asking the destination web server what the content type is it will deliver from the URL
 
Top