How to Remove Attributes from WordPress Thumbnail HTML
This article will show you how to remove attributes from the featured image HTML output of get_the_post_thumbnail() with preg_replace(). Sometimes you need the post featured image or thumbnail but not all the attributes that WordPress adds to it. Fortunately, there is a simple regular expression to strip any attributes you don’t need. You can use […]