wordpress-mobile / gutenberg-mobile

Mobile version of Gutenberg - native iOS and Android
GNU General Public License v2.0
255 stars 57 forks source link

Media Gallery Block on iOS image size affects linked file #3101

Open rezzap opened 3 years ago

rezzap commented 3 years ago

Describe the bug

It appears that when creating a gallery block on iOS and selecting an image size then the option to link to Media File, the linked to file is using the selected Image Size option instead of the original file.

To Reproduce Steps to reproduce the behavior:

  1. Go to a new post and create a gallery block.
  2. Click on add media and select some images to add to the gallery from device.
  3. When the images are added, click on the gear icon and select the option for the gallery settings. Make sure Link to is set to Media file and Image Size is not 'full-size', (e.g. Medium).
  4. Publish the post and see that the image thumbnails are always the same no matter the image size set, but the linked-to image when the image is clicked is modified by the image thumbnails.
  5. Create the same post from the browser and notice the difference.

Expected behavior

When creating a gallery block in browser, the linked-to file is not affected by the image size option and is always set to full-size. Instead, that option should be respected in the gallery display.

Screenshots IMG_31A9735D399A-1

In the following recording, the first view is from before the option to show 'Medium' images is selected, and the second one is from after that option is set, all within the app. Screen Recording 2021-02-04 at 10 16 37 am

The option does not replicate on Android as the size option is not available.

Smartphone (please complete the following information):

Additional context Reported in 3693999-zen

chipsnyder commented 3 years ago

@rezzap Are you able to recreate this in a later build?

Tested on WPiOS 16.7 on an iPhone running iOS 14.4 and I wasn't able to recreate this issue.

rezzap commented 3 years ago

@chipsnyder I'm still replicating the issue in 16.7.

On a WordPress.com simple site, I did need to disable the lightbox option though from the media settings on the site to see this. I can send you a link to my site if needed.

Looks like the app maybe adding the size to the image file. See link here: https://personallybreakingkz.files.wordpress.com/2021/02/img_9262.jpg?w=225

chipsnyder commented 3 years ago

I was able to reproduce this now but there seems to be a deeper issue at play here.

I created the same post one on mobile the other on desktop. I selected the same images for each. When I inspected the results via the HTML editor they were exactly the same except the web had alt="" on the images. Which wouldn't contribute to the issue we're exploring.

I think this will need more digging than what I can take on right now.