Add new thumbnail sizes to mobile theme

Posted in: Newspaper
Post count: 361

Is there a way to add new thumbnail sizes to the mobile theme to decrease CLS? And also change the size for the featured image on mobile?

Can I do it with:add_image_size( 'name-der-groesse' ); under //theme config and how I get it work that the mobile theme uses the new images sizes? Now the big problem is that the mobile theme has no defined thumbnail sizes that are used in the posts written with Guttenberg.

For desktop I found the file: tdb_state_single and here is defined for normal posts: // set the default image size
if ( $atts['image_size'] == '' ) {
$atts['image_size'] = 'td_696x0';
}

But as I see this is defining the width but for avoiding the CLS the height must be defined. As I see in Browser the height is: 464. So can I change td_696x0 to td_0x464? If it’s a normal image? And how I can adapt it for images used in the mobile theme?

Greetings Kathrin

Post count: 21065

Hello!

The mobile theme requires the “265×198” and the “741×486” thumbnail sizes in order to show the featured images properly. Unfortunately, there is no setting to add new sizes.

This can be found in here: https://www.screencast.com/t/N18dR3qZrh

After activating the thumbnail sizes you need to regenerate your thumbnails using a plugin. Check this: https://forum.tagdiv.com/using-the-theme-with-existing-content/

Thank you!

Post count: 361

Both sizes are activated. But what size is used in the post itself?

Greetings Kathrin

Post count: 21065

Hello!

There is no default sizes for the images used in posts. The size that you upload is also the size which is displayed in the post.

Thank you!

Post count: 361

Thank you for the information!

Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic.