![]() |
Add CDN to external images in posts
I'm trying to include a CDN in all images embeded in posts.
For this purpose i have created a plugin with a simple preg_replace: PHP Code:
For example with this it replaces everything instead of just the img src. Code:
<img src="http://www.vbulletin.com/images/smilies/spinny.gif" border="0" alt="" title="Spinny" class="inlineimg" />) <br /> <br /> example text text text Any clearer way to do the preg_replace? I just need to append http://i1.wp.com/ in the img src (and remove the http://) to get an URL like this: Code:
http://i1.wp.com/www.vbulletin.com/images/smilies/spinny.gif |
All times are GMT. The time now is 03:52 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|