Specify which image sizes are created on a per image basis

WordPress isn’t natively friendly to such granular size management. Also it could take a considerable toll on humans to manage it, if manual. The common approach is to switch image sizes generation from the moment of upload to the moment of size being requested. So the sizes which are never actually used are never generated … Read more

Change Featured Image Size of the Post

In you WordPress Admin, Go to Settings > Media, here you can set the default size of ‘thumbnail’,’medium’ and ‘large’. If you read through the codex page of the_post_thumbnail() you would have found that it has parameters that can be used to fetch a precised size of the image. the_post_thumbnail(); // without parameter -> ‘post-thumbnail’ … Read more

Delete images of a particular size

Yap, a similar things happened to us once. And one of our senior developer and my teacher, Ms. Tahmina Akter, made the following code for us. Though it’s too rough, and there are some deprecated PHP functions too (I fixed them and updated the code), but it works. CAUTION: Handle it with PROPER CARE, because … Read more

problem with updating metabox of upload image

I have no time to write at your code, but with your help works for me function wms_add_headerimage_cb( $post ){ //campuri $values = get_post_custom( $post->ID ); $headerpageimage = isset( $values[‘headerpageimage’][0] ) ? esc_attr( $values[‘headerpageimage’][0] ) : ”; $img_src = wp_get_attachment_image_src( $headerpageimage, ‘medium’ ); wp_nonce_field( ‘allpages_meta_box’, ‘allpages_meta_box_nonce’ ); ?> <p> <img id=”headerpage_image” src=”https://wordpress.stackexchange.com/questions/182634/<?php echo $img_src[0] ?>” … Read more

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