-
Notifications
You must be signed in to change notification settings - Fork 107
Open
Labels
Description
Expected/Desired Behavior
When using a block / hybrid theme that contains a theme.json file the settings.layout.contentSize & settings.layout.wideSize sizes should be used to determine the maximum width attribute that is added to images.
Actual Behavior
Currently the width gets defined by the $content_width variable which is no longer needed / used in themes that have a theme.json. (See documentation: https://developer.wordpress.org/themes/basics/theme-functions/#content-width)
vip-go-mu-plugins/a8c-files.php
Lines 288 to 291 in e1e7f55
| // Constrain default image sizes to the theme's content width, if available. | |
| if ( $content_width > 0 && in_array( $size, array( 'thumbnail', 'medium', 'large' ) ) ) { | |
| $_max_w = min( $_max_w, $content_width ); | |
| } |
Because of this block themes that don't define the old $content_width variable get the fallback value of 1024px applied which leads to blurry images when the align wide / align full option is used on an image.