![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
progressive-picture
Advanced tools
Native Lazy Loaded Picture Element with Progressive Image Change
This 700 bytes (compressed) library enhances
Picture Elements
with Progressive Image Loading and thus improves the initial time of images being displayed. You can find out more from the blog post.
$ npm install progressive-picture
<script type="module" src="https://unpkg.com/progressive-picture"></script>
picture > img {
display: block;
max-width: 100%;
height: auto;
filter: blur(0);
transition: filter 0.7s ease-in;
}
picture > img[data-src] {
filter: blur(3px);
}
picture > img.img-progressive {
width: auto;
}
<picture>
<source srcset="eu.preview.webp" data-src="eu.webp" type="image/webp" />
<source srcset="eu.preview.jpg" data-src="eu.jpg" type="image/jpg" />
<img
src="eu.preview.jpg"
data-src="eu.jpg"
loading="lazy"
width="500"
height="750"
alt=""
data-alt="Eukalyptus"
/>
</picture>
https://lazy-load-picture.netlify.app/
https://lazy-load-picture.netlify.app/masonry.html
The srcset
of <source>
and the src
of <img>
has to be filled with the URI for the low-quality image (or in case of the <source>
element: a srcset
of low quality preview pictures. The data-src holds the high-quality image(s) and will be replaced once it has been loaded.
Also, there is a data-alt Attribute that can be applied as alt, once the Image was replaced. This fixes the inelegance of displaying text before an image appears.
While this library is useful on the Web, optimizing the image correctly in the build step is the other side of the coin. This plugin snowpack-plugin-sharp could be helpful in this case.
FAQs
Native Lazy Loaded Picture Element with Progressive Image Change
The npm package progressive-picture receives a total of 127 weekly downloads. As such, progressive-picture popularity was classified as not popular.
We found that progressive-picture demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.