Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Remove redundant attributes should support <img> loading attribute #167

Open
gmarty opened this issue Oct 12, 2023 · 0 comments
Open

Comments

@gmarty
Copy link

gmarty commented Oct 12, 2023

What happened?

The default value for the lazy loading attribute of the <img> tag is "eager". See the spec.

The following htnl:

<img src="logo.jpg" alt="Our logo" loading="eager">

should be minified like this when removeRedundantAttributes is set to true:

<img src="logo.jpg" alt="Our logo">

I haven't checked, but I suspect there are a lot more default attributes that could be supported but aren't currently. Basically all enumerated attributes according to the spec should have their default value added to the minifier.

Version

7.2.0

What browsers are you seeing the problem on?

No response

Link to reproduce

No response

Relevant log output

No response

Willing to submit a PR?

Yes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant