You can give some examples of URL?yeah. i was trying to find expression for renaming all Imgur hosted PNGs to WebPs. just couldn't get it to work. would be great if this addon is fixed and someone can guide me on this particular requirement. cheers!
https://i.imgur.com/nWlNtXd.png
to https://i.imgur.com/nWlNtXd.webp
imgur.com/*.png
to imgur.com/*.webp
so... is there a simple method to remove all tinypic bbcodes from the post content through the forum! a sample code is like this:
[IMG]http://i64.tinypic.com/2zgg086.jpg[/IMG]
thanks!
/\[IMG\]http:\/\/i64\.tinypic\.com\/(.*?)\[\/IMG\]/i
again, proceed with cautionpsa. i wouldn't run this command right now because ios and macos users do not yet have the ability to see webp images. but they would in a few months (at least for the ones who upgrade to latest versions which basically means 99.99% of the few of my apple device users). so i am just looking for the code to save to run sometime later this year.
example:
converthttps://i.imgur.com/nWlNtXd.png
tohttps://i.imgur.com/nWlNtXd.webp
with wildcard:
convertimgur.com/*.png
toimgur.com/*.webp
imgur basically keeps a webp version of all images hosted on their platform. webp images are much smaller in size compared to PNGs and also JPEGs. so i can basically shrink most (non-GIF) hotlinked image from their platform with just one command. xenforo proxy also does not support webp, so this only works if you have that disabled (or supported is added in one of the 2.2.x series in future).
one issue here is that imgur file name length has increased over the years. i think early on it was five character long. now it is seven. plus there are variants for different dimensions so... the file name is not fixed. could range from 5 characters to 8.
also of course, another unanswered query of mine from previous page is whether this tool can be used to remove all tinypic images because they are all dead now. same with imageshack i assume. thanks all!
/\[img\]https:\/\/i\.imgur\.com\/(.*?)\.(jpg|png)\[\/img\]/i
Replace with:
[img]https://i.imgur.com/\1.webp[/img]
i have tested some of the oldest images and all of them work with webp. i mean they are being generated on the fly for display on their frontend on compatible browsers. i have seen their homepage load webp while the actual image pages load the regular version.Are you sure all jpg/png's have webp equivalents ?
i have tested some of the oldest images and all of them work with webp. i mean they are being generated on the fly for display on their frontend on compatible browsers. i have seen their homepage load webp while the actual image pages load the regular version.
View attachment 230484
it is a safe gamble in any case because i can rename the files back to jpegs and they would load just fine. (all images work with jpg/gif/png/webp extensions on imgur!)
this shows preview as expected! thanks. would probably do jpg and png separately because of the sheer number of files. would use the regex editor to modify this code. thanks again!/\[img\]https:\/\/i\.imgur\.com\/(.*?)\.(jpg|png)\[\/img\]/i
[video=youtube;XXXXXXXXXX]
. how do i clean this up! thanks./\[video\=youtube\;(.*?)\]/i
seems to work For our big board, i can search and see the results perfectly.If I do a quick search I also get
ErrorException: [E_WARNING] preg_match_all(): Empty regular expression in src/addons/XFPR/Admin/Controller/PostReplace.php at line 41
@Chris D, this addon is broken and unusable for large forums.
[URL='http://s195.photobucket.com/user/Colin_the_bear/media/billybargain_37741_8229.gif.html'][IMG]http://i195.photobucket.com/albums/z28/Colin_the_bear/billybargain_37741_8229.gif[/IMG][/URL]
We use essential cookies to make this site work, and optional cookies to enhance your experience.