How to re-house images in uploads/YYYY/MM
How to re-house images in uploads/YYYY/MM
How to re-house images in uploads/YYYY/MM
0 should work as a height in your thumbnail settings. The only other issue is that your uploaded images might be smaller than the large media size you’re inputting. Image thumbs won’t be scaled up for obvious reasons. If your images are larger than your thumbnail setting and you’re still not seeing thumbnails generated then: … Read more
This should work: function max_video_size( $file ) { $size = $file[‘size’]; $size = $size / 1024; $type = $file[‘type’]; $is_image = strpos( $type, ‘video’ ) !== false; $limit = 750; $limit_output=”750kb”; if ( $is_image && $size > $limit ) { $file[‘error’] = ‘Video files must be smaller than ‘ . $limit_output; } return $file; } … Read more
Thanks to Tom’s comments I better understand the issue. There are a number of solutions: re-upload the image after applying new media settings Regenerate the thumbnails with the “Regenerate Thumbnails” plugin or with wp-cli’s wp media regenerate.
You can use CSS attribute selectors to accomplish this without changing anything in the WP Admin or the HTML. A Google search for “css file type icons” comes up with several results, but I’ll explain the basic idea for you here. An attribute selector lets you style any html tag with a matching attribute. There … Read more
Twenty Fourteen uses 2 custom media sizes: 672x372px for post thumbnail image size and 1038x576px for ‘twentyfourteen-full-width’ custom image size So for images uploaded after the theme is activated, these 2 size are created automatically, but for images uploaded before twentyfourteen is activated, an available size is used and image is resized via html/css properties. … Read more
wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID() ), ‘medium’ );
Best practice would be to implement your own post_thumbnails. Then, add those sizes as options in the Add Media dialog. Here is a nice write up on that.
I use the plugin Simple Image Sizes. If you do not want to use a plugin you have to use the function add_image_size
One step picture upload