kt3k / packup

📦 Zero-config web application packager for Deno
https://packup.deno.dev/
MIT License
328 stars 18 forks source link

feat: Add support for image srcset and source element #39

Closed tjosepo closed 2 years ago

tjosepo commented 2 years ago

Changes:

Example:

<html>
  <head>
  </head>
  <body>
    <h1>Hey!</h1>
-   <img srcset="images/my_image.webp 1x,
-                images/my_image_high_res.webp 2x,
-                https://example.com/my_external_image.webp"
-        src="images/my_image_for_safari.jpeg" />
+   <img srcset="index.2c3e74ed2f07dde5b37ea53ba02d8da4.webp 1x, 
+                index.e64db08d87e7ea59f8a01df1dcbb9de5.webp 2x,
+                https://example.com/my_external_image.webp"
+        src="index.e64db08d87e7ea59f8a01df1dcbb9de5.jpeg" />
</body></html>

Implementation notes:

Bikeshedding: