Object-fit cover blows up PDF files
Print > save as pdf this example, creates a 10.7MB PDF file from a 900KB source image.
Omitting the object-fitting results in a slim PDF of just 0.9MB!
HTML
<!--
Print > save as pdf this example, creates a 10.7MB PDF file from a 900KB source image.
Omitting the object-fitting results in a slim PDF of just 0.9MB!
-->
<!doctype html>
<html>
<head>
<style>
body {
height: 111mm;
width: 216mm;
}
img {
width: 100%;
height: 100%;
/* the next line causes 10times larger PDF file, when printed */
object-fit: cover;
}
</style>
</head>
<body>
<img src="https://unsplash.com/photos/jbtfM0XBeRc/download" alt="Cover Image">
</body>
</html>