We’ve managed to fix the issue, and we’ll release an update later today. In the meantime, only if you’re familiar with editing php file, you can edit the wp-content/plugins/twentig/inc/blocks.php
and replace lines 491 to 503
if ( isset( $attributes['id'] ) ) {
$image_meta = wp_get_attachment_metadata( $attributes['id'] );
$width = absint( $image_meta['width'] );
if ( $width ) {
//cf wp_image_add_srcset_and_sizes()
$sizes = sprintf( '(max-width: 799px) 200vw,(max-width: %1$dpx) 100vw,%1$dpx', $width );
if ( isset( $attributes['twRatio'] ) ) {
$sizes = sprintf( '(max-width: 799px) 125vw,(max-width: %1$dpx) 100vw,%1$dpx', $width );
}
$attr = sprintf( ' sizes="%s"', esc_attr( $sizes ) );
$block_content = preg_replace( '/<img ([^>]+?)[\/ ]*>/', '<img $1' . $attr . ' />', $block_content, 1 );
}
}
by
if ( isset( $attributes['id'] ) ) {
$image_meta = wp_get_attachment_metadata( $attributes['id'] );
if ( $image_meta && isset( $image_meta['width'] ) ) {
$width = absint( $image_meta['width'] );
if ( $width ) {
//cf wp_image_add_srcset_and_sizes()
$sizes = sprintf( '(max-width: 799px) 200vw,(max-width: %1$dpx) 100vw,%1$dpx', $width );
if ( isset( $attributes['twRatio'] ) ) {
$sizes = sprintf( '(max-width: 799px) 125vw,(max-width: %1$dpx) 100vw,%1$dpx', $width );
}
$attr = sprintf( ' sizes="%s"', esc_attr( $sizes ) );
$block_content = preg_replace( '/<img ([^>]+?)[\/ ]*>/', '<img $1' . $attr . ' />', $block_content, 1 );
}
}
}
Thanks