Default Post Featured Image size
-
Hi,
I am looking for way to set default image size for Post Featured Image block.
I already tried to do it with wp.hook.addfilter but this doesnt work properly.
In gutenberg editor attribute for block is set correctly but on page this doesnt work and images are in full resolution.
Is there any other option to set default size?((wp) => { const setDefaultSizeForPostFeaturedImage = (settings, name)=>{ if(name == "core/post-featured-image"){ settings.attributes.sizeSlug = { type:'string', default: 'thumbnail' } } return settings; } wp.hooks.addFilter( 'blocks.registerBlockType', 'ji/remove-drop-cap', setDefaultSizeForPostFeaturedImage ); })(window.wp);
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Default Post Featured Image size’ is closed to new replies.