
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
@imageengine/imageengine-helpers
Advanced tools
A set of helper functions to generate ImageEngine custom urls with valid directives
A tiny set of helpers and TS types for building ImageEngine query URLs for your distribution.
These set of utilities only make sense if you want to use an object to declare your directives for when retrieving assets from an ImageEngine distribution.
Install it with:
npm install @imageengine/imageengine-helpers
View on npm
Types:
export type IEFormat =
"png" |
"gif" |
"jpg" |
"bmp" |
"webp" |
"jp2" |
"svg" |
"mp4" |
"jxr" |
"avif" ;
export type IEFit =
"stretch" |
"box" |
"letterbox" |
"cropbox" ;
export interface IEDirectives {
width?: number; // the intrinsic width of the final image
height?: number; // the intrinsic height of the final image
auto_width_fallback?: number; // if WURFL device detection should be tried with a
// fallback value in case it fails
scale_to_screen_width?: number; // 0-100 float
crop?: [number, number, number, number]; // [width, height, left, top]
format?: IEFormat; // the output format
fit?: IEFit; // the image fit in relation to the provided width/height
compression?: number; // 0-100
sharpness?: number; // 0-100
rotate?: number; // -360-360
inline?: true; // convert image to dataURL
keep_meta?: true; // keep EXIF image data
no_optimization?: true; // don't apply IE optimizations
};
For instance:
import { build_IE_url, build_IE_directives, build_IE_query_string } from "imageengine-helpers";
let directives: IEDirectives = {
width: 400,
height: 200,
fit: "cropbox",
compression: 10,
inline: true,
format: "png"
};
let source_url: string = "https://my_ie_distribution.imgeng.io/path/to_asset1.jpg";
let final_url: string = build_IE_url(source_url, directives);
/*
"https://my_ie_distribution.imgeng.io/path/to_asset1.jpg?imgeng=/w_400/h_200/m_cropbox/cmpr_10/in_true/f_png"
*/
let directives_string: string = build_IE_directives(directives);
/*
"/w_400/h_200/m_cropbox/cmpr_10/in_true/f_png"
*/
let query_string: string = build_IE_query_string(directives);
/*
"?imgeng=/w_400/h_200/m_cropbox/cmpr_10/in_true/f_png"
*/
FAQs
A set of helper functions to generate ImageEngine custom urls with valid directives
The npm package @imageengine/imageengine-helpers receives a total of 70 weekly downloads. As such, @imageengine/imageengine-helpers popularity was classified as not popular.
We found that @imageengine/imageengine-helpers demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 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 breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.