MCPcopy Create free account
hub / github.com/stereobooster/react-ideal-image

github.com/stereobooster/react-ideal-image @v0.0.4

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.0.4 ↗ · + Follow
41 symbols 78 edges 20 files ⚖ MIT 0 documented · 0% 5 cross-repo links ● updated 3y ago★ 3,24315 open issues

Browse by type

⨍ Functions 35◇ Types & classes 6
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

react-ideal-image

Adaptive image component


Build Status Code Coverage version downloads MIT License

All Contributors PRs Welcome Code of Conduct

Watch on GitHub Star on GitHub Tweet

The problem

I need React component to asynchronously load images, which will adapt based on network, which will allow a user to control, which image to load.

This solution

Read the introduction.

Table of Contents

Installation

This module is distributed via npm which is bundled with node and should be installed as one of your project's devDependencies:

npm install react-ideal-image react-waypoint --save

Usage

Example for create-react-app (you need v2 for macros) based project

import React from 'react'
import lqip from 'lqip.macro'
import IdealImage from 'react-ideal-image'

import image from './images/doggo.jpg'
const lqip = lqip('./images/doggo.jpg')

const App = () => (
  <IdealImage
    placeholder={{lqip}}
    srcSet={[{src: image, width: 3500}]}
    alt="doggo"
    width={3500}
    height={2095}
  />
)

Other Solutions

Contributors

Thanks goes to these people (emoji key):

| [

stereobooster](https://github.com/stereobooster)

💻 📖 🚇 ⚠️ | [

Ivan Babak](https://github.com/sompylasar)

📖 | [

Arun Kumar](https://github.com/palerdot)

📖 | | :---: | :---: | :---: |

This project follows the all-contributors specification. Contributions of any kind welcome!

LICENSE

Code - MIT

Icons - Apache License 2.0

Core symbols most depended-on inside this repo

browse all functions →

Shape

Function 22
Method 13
Class 6

Languages

TypeScript100%

Modules by API surface

src/components/IdealImage/index.js12 symbols
src/components/Media/index.js7 symbols
src/components/helpers.js6 symbols
src/components/unfetch.js5 symbols
src/components/loaders.js4 symbols
src/components/MediaWithDefaults/index.js1 symbols
src/components/IdealImageWithDefaults/index.js1 symbols
src/components/Icon/index.js1 symbols
src/components/Icon/Warning.js1 symbols
src/components/Icon/Offline.js1 symbols
src/components/Icon/Loading.js1 symbols
src/components/Icon/Download.js1 symbols

Dependencies from manifests, versioned

babel-loader7.1.4 · 1×
babel-plugin-transform-class-properties6.24.1 · 1×
babel-plugin-transform-object-rest-spread6.26.0 · 1×
babel-preset-env1.7.0 · 1×
babel-preset-react6.24.1 · 1×
gh-pages1.2.0 · 1×
kcd-scripts0.39.0 · 1×
prop-types15.6.1 · 1×
react16.3.2 · 1×
react-dom16.3.2 · 1×
react-styleguidist7.0.16 · 1×
react-test-renderer16.3.2 · 1×

For agents

$ claude mcp add react-ideal-image \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page