0

The site I'm managing is using Jetpack's mobile theme for mobile devices. This works relatively well, except for the fact that for featured images the mobile site loads the full sized image instead of the resized thumbnails used by the desktop theme.

With some of the images going up to 3000px wide in their original resolutions, this means that most pages on the site is actually larger on the mobile theme than on desktop. The worst offender is the archive pages, where a large number of featured images is shown. As can be seen here, some pages are 5x as large on mobile.

This is unacceptable. How can I fix this, preferably without editing the Jetpack theme file itself, since those changes will be gone when I update Jetpack?

0

It turns out Minileven (the mobile theme that comes bundled with Jetpack) uses the main theme's default post_thumbnail_size, which is set using set_post_thumbnail_size. Adding this line to my main theme's functions.php inside a function called through the after_theme_setup action helped solve the problem:

set_post_thumbnail_size( 600, 400, true );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.