• Resolved Doug Wollison

    (@dougwollison)


    I recently noticed a rendering bug on a site I’m developing, it’s caused by the box drawn by the browser being a drastically different aspect ratio from the actual logo (when it’s not fully rendered because it’s hidden inside a collapsible).

    By the looks of it, the cause is the wp_generate_attachment_metadata hook, which fills out the sizes list for the image, but just provides the max width/height for the size. This causes my 16:9 flag SVG to breifly render as a 8.5:11 box (my images sizes have taller height due to a lot of PDF covers) until the browser downloads and reads the proper aspect ratio for the image.

    I’m currenly resolving this by adding a hook after the fact that simply unsets the sizes array, but I think that this should be rewritten to output the correct width/height according to the aspect ratio of the SVG.

Viewing 1 replies (of 1 total)
  • Plugin Author Benbodhi

    (@benbodhi)

    Thanks for your feedback!

    I have noticed this sort of thing as well and plan to implement some better code to handle sizes. Hopefully I can get it into the next update coming shortly.

Viewing 1 replies (of 1 total)

The topic ‘Intermediate sizes not accounting for aspect ratio’ is closed to new replies.