
Security News
Rust RFC Proposes a Security Tab on crates.io for RustSec Advisories
Rustâs crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.
@agent-infra/media-utils
Advanced tools
A utility package for handling media files, specifically designed for processing base64 encoded images.
npm install @agent-infra/media-utils
[!NOTE] Currently only supports parsing static base64 image formats: PNG, JPEG, WebP, GIF, and BMP
Supports both Node.js and browsers.
import { Base64ImageParser } from '@agent-infra/media-utils';
// Initialize with a base64 image string
// You only need to ensure that the input base64 string is image data; the data URI prefix is not required.
const tool = new Base64ImageParser(
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgA...',
);
// or
const tool = new Base64ImageParser('iVBORw0KGgoAAAANSUhEUgA...');
// Get image type
const imageType = tool.getImageType(); // 'png' | 'jpeg' | 'webp' | 'gif' | 'bmp' | null
// Get image dimensions
const dimensions = tool.getDimensions(); // { width: number, height: number } | null
// Get pure base64 string (without data URI prefix)
const pureBase64 = tool.getPureBase64Image();
// Get image buffer
const buffer = tool.getBuffer(); // Uint8Array
// Get data URI
const dataUri = tool.getDataUri(); // 'data:image/png;base64,...'
import { Base64ImageParser } from '@agent-infra/media-utils';
const base64Image =
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg==';
const tool = new Base64ImageParser(base64Image);
console.log('Image type:', tool.getImageType()); // 'png'
console.log('Dimensions:', tool.getDimensions()); // { width: 1, height: 1 }
console.log('Pure base64:', tool.getPureBase64Image()); // 'iVBORw0KGgo...'
Apache License 2.0.
Special thanks to the open source projects that inspired this toolkit:
FAQs
media-utils
The npm package @agent-infra/media-utils receives a total of 3,089 weekly downloads. As such, @agent-infra/media-utils popularity was classified as popular.
We found that @agent-infra/media-utils demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Rustâs crates.io team is advancing an RFC to add a Security tab that surfaces RustSec vulnerability and unsoundness advisories directly on crate pages.

Security News
/Research
Socket found a Rust typosquat (finch-rust) that loads sha-rust to steal credentials, using impersonation and an unpinned dependency to auto-deliver updates.

Research
/Security Fundamentals
A pair of typosquatted Go packages posing as Googleâs UUID library quietly turn helper functions into encrypted exfiltration channels to a paste site, putting developer and CI data at risk.