npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

react-image-cached-resizer

v1.4.1

Published

Provides React.js image resizing, memory cache, SSR capabilities, and image magnification capabilities

Downloads

242

Readme

GitHub npm GitHub release (latest by date)

react-image-cached-resizer

Install

npm install react-image-cached-resizer

yarn add react-image-cached-resizer

We offer a variety of functions

👍 Improved image rendering speed and performance

✅ Image Resizing and Optimizing Rendering

✅ Provides Webp extension conversion

✅ Image Memory Cache

✅ server-side rendering

🗃 Provide ️ image or avatar widget types

🔍 Provide image magnification


How to use

import { Image, Avatar } from "react-image-cached-resizer";

function App() {
  return (
    <>
      <Image
        source="https://avatars.githubusercontent.com/u/120083142?v=4" // Image source url
        alt="this image"
        size={{ maxWidth: 400, maxHeight: 300 }} // Image sizes
        ratio={{ x: 3, y: 2 }} // Image size percentage (ratio)
        objectFit="cover"
        zoomUp={true} // Image zoom pop-up or not
        borderRadius={10}
        onClick={() => console.log("onClick")}
      />

      <Avatar
        source="https://avatars.githubusercontent.com/u/120083142?v=4" // Avatar source url
        alt="user-avatar"
        size={100} // Avatar size
        zoomUp={true} // Avatar zoom pop-up or not
        borderRadius={100}
        zoomUpImageSize={400}
        onClick={() => console.log("onClick")}
      />
    </>
  );
}

Image : Use Documentation

| Props | Type | Features | Description | Default | | -------------- | ------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | --------- | | source (*) | string , File | Image source url | Enter the image url or Public image path. | | | alt (*) | string , alt | alt | | | | zoomUp | boolean | Image zoom pop-up or not | Image zoom pop-up or not | false | | size.width | "auto" , "100%" , string | You can set a width value within the size. | ex_width={{width:’100%’}} | 100% | | size.minWidth | number , string | You can set the minWidth value within the size. | ex_minWidth={{minWidth:300}} | auto | | size.maxWidth | number , string | You can set the maxWidth value within the size. | ex_maxWidth={{maxWidth:300}} | auto | | size.height | "auto" , "100%" , string | You can set a height value within the size. | ex_height={{height:’100%’}} | 100% | | size.minHeight | number , string | You can set the minHeight value within the size. | ex_minHeight={{minHeight:300}} | auto | | size.maxHeight | number , string | You can set the maxHeight value within the size. | ex_maxHeight={{maxHeight:300}} | auto | | ratio | { x?: number; y?: number } | Image size percentage (ratio) | Image size percentage (ratio) | | | objectFit | "cover" , "contain" , "fill" , "none" , undefined | Specify how you want to size your content to fit your elements | Specify how you want to size your content to fit your elements | undefined | | borderRadius | number , string | borderRadius | borderRadius | 0 | | … props | | | | |



Avatar : Use Documentation

| Props | Type | Features | Description | Default | | --------------- | ------------------------------------------------- | -------------------------------------------------------------- | -------------------------------------------------------------- | --------- | | source (*) | string , File | Image source url | Enter the image url or Public image path. | | | alt (*) | string , alt | alt | | | | zoomUp | boolean | Image zoom pop-up or not | Image zoom pop-up or not | false | | zoomUpImageSize | number | Image zoom pop-up size | Image zoom pop-up size | false | | size | number | Avatar Image Size | Avatar image size must be 1:1 ratio | 30 | | objectFit | "cover" , "contain" , "fill" , "none" , undefined | Specify how you want to size your content to fit your elements | Specify how you want to size your content to fit your elements | undefined | | borderRadius | number , string | borderRadius | borderRadius | 0 | | … props | | | | |


License

MIT © Deepfactory, Inc. See LICENSE for details.