jetpack icon indicating copy to clipboard operation
jetpack copied to clipboard

Slideshow block: Full width and wide width display shows scaled down images

Open benchilcote opened this issue 7 years ago • 49 comments

Jump to most recent technical analysis from June 2022: https://github.com/Automattic/jetpack/issues/12178#issuecomment-1157025213

Steps to reproduce

  1. Activate a twenty nineteen child theme
  2. Create a page/post
  3. Add new Slideshow Block and add one or more large images
  4. Set display mode to full width
  5. Publish and view page

What I expected

I expected the images to extend to the edge of the browser window.

What happened instead

The images are displayed as a scaled down version surrounded by grey space.

Note: This happens with wide width display as well.

Screenshot / Video

Annotation on 2019-3-4

Screen Shot 2019-04-25 at 6 25 08 AM

Screen Shot 2019-04-25 at 6 19 46 AM

Screen Shot 2019-04-25 at 6 20 49 AM

Other

#1984153-zen

benchilcote avatar Apr 25 '19 10:04 benchilcote

I was able to reproduce this reliably on all the WordPress.com Gutenberg-ready themes on a simple site.

liviopv avatar Jun 12 '19 14:06 liviopv

Also reproduced with a fresh jurassic.ninja site:

Screenshot Screenshot: https://cld.wthms.co/f5JiWQ

liviopv avatar Jun 12 '19 15:06 liviopv

I was able to find the thread where we tried to find out more about this bug.

One example from the user's site: https://cld.wthms.co/ZwmZEb

Definitely a bug with the Twenty Nineteen themes.

blazevivan avatar Jun 12 '19 17:06 blazevivan

The thing is that we're making the wrapper full-width but keeping the images with a max-size of 100%. A workaround, for now, is to force this with some custom CSS:

/* Slideshow Full Width block: make the images full width as well */
.wp-block-jetpack-slideshow.alignfull .wp-block-jetpack-slideshow_image {
  width: 100vw;
  max-width: unset;
  object-fit: cover;
}

Result:

Captura de Tela 2019-07-06 às 13 05 11

eduardozulian avatar Jul 06 '19 16:07 eduardozulian

Also reported in 2192074-zen on the Olsen theme.

Sent a mod on Edu's code above as a workaround

liviopv avatar Jul 19 '19 16:07 liviopv

2516263-zen. Shared @eduardozulian's CSS workaround for now.

arunsathiya avatar Nov 25 '19 15:11 arunsathiya

Brought up during a Quick Start Session. Provided workaround to user in 2579322-zen

GeoJunkie avatar Dec 22 '19 19:12 GeoJunkie

Another report in 2633401-zen. Provided Eduardo's workaround.

kriskorn avatar Jan 15 '20 06:01 kriskorn

The user at #18347729-hc faced the same issue. Provided the CSS from above.

aisajib avatar Feb 05 '20 07:02 aisajib

The thing is that we're making the wrapper full-width but keeping the images with a max-size of 100%. A workaround, for now, is to force this with some custom CSS:

/* Slideshow Full Width block: make the images full width as well */
.wp-block-jetpack-slideshow.alignfull .wp-block-jetpack-slideshow_image {
  width: 100vw;
  max-width: unset;
  object-fit: cover;
}

Result:

Captura de Tela 2019-07-06 às 13 05 11

thanks, but not sure why is not taking the fulls size image and it uses a resized version = ?resize=768%2C512

strange and ugly bug

neo22s avatar Apr 28 '20 00:04 neo22s

Also reported in #20693968-hc, provided CSS as a workaround

edequalsawesome avatar Apr 29 '20 20:04 edequalsawesome

Also reported in #20693968-hc, provided CSS as a workaround

did it work for you?

neo22s avatar Apr 29 '20 21:04 neo22s

@neo22s it's not taking the full size because this particular CSS code does not alter how WordPress is loading the image. Try to change your content width to a higher number under Customizer > CSS > Media Width and see if that helps.

eduardozulian avatar May 05 '20 19:05 eduardozulian

Reported on 11677309-hc

eduardozulian avatar Jul 10 '20 13:07 eduardozulian

function composer_child_setup_theme() {
$GLOBALS['content_width'] = 2000;
}
add_action( 'init', 'composer_child_setup_theme' );

this did work

neo22s avatar Jul 10 '20 13:07 neo22s

Another case here: #3112051-zen. Provided CSS workaround.

KristinaKay avatar Jul 10 '20 15:07 KristinaKay

Another case 3153628-zen. Provided CSS workaround.

zdenys avatar Jul 22 '20 10:07 zdenys

Another case with 23161957-hc. Provided CSS workaround.

kathleenjross avatar Aug 05 '20 16:08 kathleenjross

Another case, 20863523-hc but i had to tweak the CSS a bit for this/

/* Slideshow Full Width block: make the images full width as well #20863523-hc/KD */
.swiper-slide-active .wp-block-jetpack-slideshow_image {
      width: 100vw;
  max-width: unset;
  object-fit: cover;
}

KristinaKay avatar Aug 21 '20 14:08 KristinaKay

Another case on 25586681-hc. The workaround with the CSS fixed it.

I also would like to add that if you're working with an Atomic site, you might want to disable Performance & speed > Enable site accelerator > Speed up image load times, since when that's active you get a very small image centered in the Slideshow:

SlideshowWithPerformanceEnabled

carinapilar avatar Nov 12 '20 13:11 carinapilar