
Security News
Feross on the 10 Minutes or Less Podcast: Nobody Reads the Code
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.
@imageengine/react
Advanced tools
Hassle-free way to deliver optimized responsive images in your React applications.
The package includes four components:
ImageEngineProviderImagePictureSourceTo start using provided image tags in your application, place ImageEngineProvider somewhere above them in the DOM tree with the deliveryAddress prop set to your ImageEngine Delivery Address:
import { ImageEngineProvider } from "@imageengine/react"
function App () {
return (
<ImageEngineProvider
deliveryAddress="https://blazing-fast-pics.cdn.imgeng.in"
// or, for local development:
// deliveryAddress="http://localhost:9009"
>
<ShoppingCart />
...
</ImageEngineProvider>
)
}
import { Image } from "@imageengine/react"
function ShoppingCart () {
return (
<section>
<Image
src="pick-ups/custom/unstoppable.jpg"
srcSet={...}
sizes={...}
directives={...}
{...otherProps}
/>
</section>
...
)
}
deliveryAddress - ImageEngine Delivery Address:
deliveryAddress: string
stripFromSrc - Strip away a portion of a source string in all ImageEngine's components. Particularly useful if your images are coming from a headless CMS and you need to erase something in received URL path (origin, for example):
stripFromSrc?: string
src - Relative path to the image:
src: string
directives - ImageEngine directives:
directives?: {
// Define desired width.
width?: number
// Set width to auto (with fallback).
autoWidthWithFallback?: number
// Define desired height.
height?: number
// Adjust compression.
// Possible range: 0-100.
compression?: number
// Define desired output format.
outputFormat?:
| "png"
| "gif"
| "jpg"
| "bmp"
| "webp"
| "jp2"
| "svg"
| "mp4"
| "jxr"
// Define desired fit method.
fitMethod?: "stretch" | "box" | "letterbox" | "cropbox"
// Don't apply any optimizations to the origin image.
noOptimization?: true
// Adjust sharpness.
// Possible range: 0-100.
sharpness?: number
// Define rotation.
// Possible range: -360 to 360.
rotate?: number
// Use WURFL to calculate screen's width and then scale the image accordingly.
// Possible range: 0-100 (float).
scaleToScreenWidth?: number
// Crop the image [width, height, left, top].
crop?: number[]
// Convert the image into a data url.
inline?: true
// Keep EXIF data.
keepMeta?: true
}
srcSet - List of image variations for the image source set:
srcSet?: [{
// Relative path to the image.
src: string
// Width descriptor.
width: string
// Custom optimization instructions.
directives?: TDirectives
}]
srcSet - List of image variations for the image source set:
srcSet?: [{
// Relative path to the image.
src: string
// Width descriptor.
width: string
directives?: TDirectives
}]
FAQs
React components for seamless integration with ImageEngine
The npm package @imageengine/react receives a total of 25 weekly downloads. As such, @imageengine/react popularity was classified as not popular.
We found that @imageengine/react demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers 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
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.