custom thumbnail sizes draft

This commit is contained in:
pavak committed 2023-08-21 20:35:22 +05:30
1 parent 3c7ffd437e
commit 3136777370
6 files changed
+97

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
// Add new image sizes:
add_image_size( 'thumb-512x384', 512, 384, true );
add_image_size( 'thumb-640x480', 640, 480, true );
// Register the sizes:
add_filter( 'image_size_names_choose', 'my_custom_image_sizes' );
function my_custom_image_sizes( $sizes ) {
return array_merge( $sizes, array(
'thumb-512x384' => __( 'Thumbnail 512x384px' ),
'thumb-640x480' => __( 'Thumbnail 640x480px' ),
) );
}