Socket
Socket
Sign inDemoInstall

@tueri/react-tueri

Package Overview
Dependencies
13
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @tueri/react-tueri

Tueri integration for ReactJS


Version published
Weekly downloads
29
increased by625%
Maintainers
1
Install size
217 kB
Created
Weekly downloads
 

Readme

Source

Tueri for React

React integration for Tueri image processing service.

  • Automatic image optimization (compression, resizing and image format)
  • Responsive images
  • Lazy Loading
  • Low-quality image placeholders (LQIP)

Installation

  • NPM: npm install @tueri/react-tueri
  • YARN: yarn add @tueri/react-tueri

Usage

  1. Add the <TueriProvider/> component to the root of your React component tree. This component provides child components api and base url information.
import TueriProvider from '@tueri/react-tueri'

ReactDOM.render(
    <TueriProvider>
        <MyRootComponent />
    </TueriProvider>,
    document.getElementById('root)
)
  1. Use the Tueri <Img /> component to render your images.
<Img src={ tueriImageId } alt='Alt Text' />

The <Img /> component automatically handles image optimization, responsive images, lazy loading and low-quality image placeholders.

Props

  • src: String (REQUIRED)

  • alt: String (REQUIRED)

  • options: Object (optional)

    • Default: { w: autoCalculatedWidth }
    • Possible values: see documentation for complete option list
  • format: String (optional)

    • Default: 'jpg'
    • Possible values: 'jpg', 'png', 'webp', 'gif'

Keywords

FAQs

Last updated on 30 Apr 2019

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc