WordPress.org

Make WordPress Core

Opened 2 years ago

Last modified 22 months ago

#35559 new defect (bug)

Image wrapped in anchor disappear in Customizer (Safari)

Reported by: halftones Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.4
Component: Customize Keywords: dev-feedback
Focuses: performance Cc:

Description

Medium and large size images that set as a featured images displaying through the_post_thumbnail disappear when viewing from customizer if height is not set strictly (400px for example). It disappear time to time – try to reload page or click menu links to update customizer window.

Attachments (1)

featured_image_screencast.mov (8.3 MB) - added by halftones 2 years ago.
featured image screencast

Change History (25)

#1 @halftones
2 years ago

It depends on image size.

#2 @westonruter
2 years ago

  • Keywords reporter-feedback added

Thank you for the report. This may actually be a problem with your server and uploading images, where WordPress fails to resize the image.

What are the dimensions of the images you are uploading? Have you tried in a core theme with plugins disabled?

Last edited 2 years ago by westonruter (previous) (diff)

#3 @halftones
2 years ago

I tried on a different servers. Height of image should be auto (like customizer can not show image if it heigh isn't strictly) – then it disappear. Solved for me with script that assign height (calculated on ratio of natural image dimensions) for image. My image dimensions 1059 × 749.

Last edited 2 years ago by halftones (previous) (diff)

#4 @westonruter
2 years ago

@halftones thanks. What theme are you testing with?

#5 @halftones
2 years ago

It doesn't depend on theme – I tried a few. Take Portfolium (WPShower) for example.

Last edited 2 years ago by halftones (previous) (diff)

#6 @halftones
2 years ago

But in Portfolium you need to remove the_post_thumbnail size ( it's in portfolio loop ) because it's small by default – and it does not disappear.

#7 @halftones
2 years ago

  • Keywords reporter-feedback removed

#8 @joshe@…
2 years ago

I'm having this same issue. It appears that the size of the image is what is causing the problem. If i use a small image it displays in no problem, but if i select a larger image it gives me a box with the name of the photo in it only.

The image does work on the live side when saved and loaded. It appears to be a admin/customizer side issue.

#9 @halftones
2 years ago

  • Keywords dev-feedback added

#10 @westonruter
2 years ago

  • Keywords reporter-feedback added; dev-feedback removed

I'm still having a hard time identifying the specific steps to reproduce the issue. Could a screencast be made showing the steps to reproduce the issue? Using the core Twenty Fifteen theme to do so would be helpful.

@halftones
2 years ago

featured image screencast

#11 @halftones
2 years ago

  • Keywords dev-feedback added; reporter-feedback removed

#12 @westonruter
2 years ago

  • Keywords dev-feedback removed

@halftones thanks for that helpful screencast. So the featured image for a post is showing up on the homepage, but it is not showing up on the month archive or single templates? The featured images are appearing for me on these templates in Twenty Fifteen, so I cannot seem to reproduce the issue you are experiencing.

Are you able to look at the network log and see if the featured image is 404'ing? Can you look inspect the post element in the DOM inspector to see if the .post-thumbnail element is there but if there is something wrong with the img element?

#13 @halftones
2 years ago

No, no. Image disappear from everywhere after customizer reload window – just for example I clicked on archives and then on index page. You can just reload window for example. Image actually exist in structure and if you set height strictly (for example from inspector) – it will appear. Something with height and ajax i think.

#14 @westonruter
2 years ago

  • Focuses performance removed

OK, well then I certainly can't reproduce the issue.

#15 @halftones
2 years ago

How can I help you with reproducing the issue? Did you try to reload customizer window or change any option to reload window? You could ask somebody in your team. I believe every WordPress user now have this issue

This ticket was mentioned in Slack in #core-customize by westonruter. View the logs.


2 years ago

#17 @halftones
2 years ago

I think it's not right to mention this bug as a Slack just because you can't reproduce it. I made screencast for that bug – it shows this bug, clearly. It's not like some slack bug – images disappears – it's really bad for users.

#18 @dd32
2 years ago

@halftones Slack is a communication tool we use for discussing WordPress Development, it's not a reflection upon you or your report at all. The conversation which the above comment links to, is asking for help from others to help reproduce it so that it can be fixed.

You can find more information about our usage of Slack here: https://make.wordpress.org/chat/

#19 @dd32
2 years ago

  • Version changed from 4.4.1 to 4.4

I've been able to duplicate this issue in Safari.

Things to note:

  • Safari-only, Chrome not affected. Tested with Safari Version 9.0.2 (11601.3.9)
  • Reproduced it with a image 3443 × 1967
  • Could not reproduce it with an image 1200 × 800
  • All sizes & srcset is correct
  • The img element in twentyfifteen is shown as 0px tall by Safari inspector
  • Double clicking the srcset attribute in Safari's inspector, and then clicking out of it (so no changes are made) causes the image to come back into view.

This looks like some kind of safari srcset bug that's triggered by the customizer somehow, I'm unable to cause it to happen without the customizer.

Last edited 2 years ago by dd32 (previous) (diff)

This ticket was mentioned in Slack in #core-customize by dd32. View the logs.


2 years ago

#21 @halftones
2 years ago

Thank you

#22 @celloexpressions
2 years ago

  • Summary changed from Featured Image disappear when viewing from customizer to Featured Image disappear when viewing from customizer in Safari

Can anyone with Safari test to see if this issue still exists? Hoping it might have been fixed in a Safari update. I'm guessing that it could be as simple as an srcset bug in Safari in iframes generally, which would make it virtually impossible for core to fix unfortunately. Seems like it also might be specific to hidpi screens?

#23 @halftones
2 years ago

  • Focuses performance added; javascript removed

Still exist in Safari. On ordinary, not hidpi screen.

#24 @halftones
22 months ago

  • Keywords dev-feedback added
  • Summary changed from Featured Image disappear when viewing from customizer in Safari to Image wrapped in anchor disappear in Customizer (Safari)

I have found that any <img> wrapped in <a> disappear in customizer most of the time. (Safari)

Note: See TracTickets for help on using tickets.