Auto delete attachments that are older than x days

Are you really sure you want to do this? What about all of the posts that these “old” attachments are used in? For attachments that are used for things like “featured image”, WP will take of that for you. However, for uses of an attachment in post_content, e.g. <img src=”https://wordpress.stackexchange.com/questions/258966/img_attachment_url” /> <a href=”pdf_attachment_url”>download PDF</a> you’ll … Read more

Check what attached image size is used

I think I’d use the get_image_tag filter for this – it provides you with the size as one of the parameters. Something along the lines of: function wrap_wide_image_tags($html, $id, $alt, $title, $align, $size) { if($size == ‘wide-image’) { $html=”<div class=”wrap-wide-image”>”.$html.'</div>’; } return $html; } add_filter(‘get_image_tag’, ‘wrap_wide_image_tags’, 10, 6); Hope this helps!

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)