Get Attachment ID from a WordPress Image URL

Taking a WordPress image URL and using it to get the attachment ID is a bit tricky. There are a lot of code samples out there that do this, but they all have problems to some degree or another. Pippin Williamson posted a very elegant solution based on comparing the URL to the guid in … Continue reading Get Attachment ID from a WordPress Image URL

Remove Image Size Attributes for Responsive Images in WordPress

WordPress, by default, will add the width and height attributes to image elements. These attributes will override CSS width and height properties. Making images with these dimension attributes responsive is a bit of a hassle, or in some cases cannot be done at all. Strip Image Dimension Attributes from Inserted Images Stripping out the image … Continue reading Remove Image Size Attributes for Responsive Images in WordPress