function replace_content($title,$newstext){
$newstext = stripcslashes($newstext);
$imgRegex='/<\s*img[\s\S]+?(?:src=[\'"]([\S\s]*?)[\'"]\s*|alt=[\'"]([\S\s]*?)[\'"]\s*|[a-z]+=[\'"][\S\s]*?[\'"]\s*)+[\s\S]*?>/i';
$str = preg_replace($imgRegex,'<img class="lazy" data-src="$1" alt="$2" title="$2" width="100%" alt="$2" style="margin:8px 0">',$newstext);
return $str;
}