Skip to content

Commit

Permalink
Add image layout attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
rkazakov committed Jul 1, 2022
1 parent 4ea5711 commit bdd00ef
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ module.exports = async (html, options) => {
});

/* head */

$('*').removeAttr('style');

/* main amp library */
Expand Down Expand Up @@ -171,6 +170,11 @@ module.exports = async (html, options) => {
}
});

/* img layout */
$('img').each((_, element) => {
$(element).attr({ layout: 'responsive' });
});

/* inline styles */
let inlineCss = '';

Expand Down
8 changes: 4 additions & 4 deletions test/images.test.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bdd00ef

Please sign in to comment.