I have a smarty variable which holds the HTML content as value. Inside the HTML content there is an image. I have to extract the url of that image for resize purposes.
I know there is a way to parse it in php and assign to smarty variable. But I need to know whether there is any method in smarty like regex to get the url of the <img>
tag from HTML.
example:
{$post_content|regex_replace:"/(<img>|<img [^>]*>|<\\/>)/":""}
This is the code to escape <img>
tag alone. Likewise I need to get the url of the image from the $post_content
variable.