Skip to content

createOptimizedPicture should set img width/height attributes #169

@stefanseifert

Description

@stefanseifert

Expected Behaviour

the img element generated by createOptimizedPicture should contain width/height attributes.

Actual Behaviour

the current implementation of createOptimizedPicture generates images without specifying width/height attributes - google pagespeed complains about this, and it often leads to cumulative layout shift (CLS).

please note that the actual width/height of the source image is not part the URL that is used as src input parameter, and is not contained in the data generated by query-index.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions