Turn on/off addition of custom image sizes
-
Hi,
I have limited storage space with my web hosting provider, so I need to limit the number of copies of each image uploaded.
The Atomic Blocks plugin creates 2 additional customized image sizes (600×660 and 600×400) that are only used in the block POST GRID.Since I am not using that particular block, I would like to either have a selector for the block, a selector to skip creating these 2 additional image sizes, or a hook to edit plugin code.
Is any of this planned? Or can it be added with low effort? The block “post grid” will still be usable but with the wordpress generated image sizes.The current hack that I have to avoid these 2 unnecessary image sizes is to edit the plugin directly and comment out the line “add_action( ‘after_setup_theme’, ‘atomic_blocks_image_sizes’ );” in the block below.
However, this is not a nice solution as it gets erased with every plugin update.—————————————————–
/**
* Add image sizes
*/
function atomic_blocks_image_sizes() {
// Post Grid Block.
add_image_size( ‘ab-block-post-grid-landscape’, 600, 400, true );
add_image_size( ‘ab-block-post-grid-square’, 600, 600, true );
}
add_action( ‘after_setup_theme’, ‘atomic_blocks_image_sizes’ );
—————————————————–Thanks in advance for the support. The plugin is really great and I love the block NOTICE.
- The topic ‘Turn on/off addition of custom image sizes’ is closed to new replies.