Jump to content

Detecting img tags in a bunch of text?


RagingEagle

Recommended Posts

Hi,

I have a whole bunch of HTML formatted text that is being outputted to my site and in it sometimes images are included but if the image is over 50k in size I don't want it to display that image.

How would I go about doing this? I tried some code where it detected the [b]<img src[/b] part but how do I take the actual image, lets say: [b]<img src="theimage.jpg">[/b] how do I just get [b]theimage.jpg[/b] so I can check its file size?

Thanks!
Link to comment
https://forums.phpfreaks.com/topic/35183-detecting-img-tags-in-a-bunch-of-text/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.