npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@roottale/cms-media

v0.26.0

Published

RootTale 미디어 — R2 원본 보관 + CF Images variants + 한글 파일명 정규화 + CfImage 렌더 컴포넌트(@roottale/cms-media/react). ADR-0034 §3 / docs/image-standard.md.

Downloads

248

Readme

@roottale/cms-media

RootTale 미디어 패키지 — R2 원본 보관 + CF Images variants + 한글 파일명 정규화 + CfImage 렌더 컴포넌트. (ADR-0034 §3, docs/image-standard.md)

두 엔트리:

  • @roottale/cms-media — 서버(R2/S3 클라이언트, variant URL 생성, 파일명 정규화). Node.
  • @roottale/cms-media/react — 클라이언트 CfImage 렌더 컴포넌트("use client"). react는 optional peer.

CfImage (@roottale/cms-media/react)

next/image 대체. CF Images는 이미 variant(sm/md/lg, 자동 webp/avif)를 제공하므로 브라우저가 직접 받게 한다 → Vercel 이미지 최적화 함수(/_next/image, Fluid Compute) 비용 0.

import { CfImage } from "@roottale/cms-media/react";

<div style={{ position: "relative", height: 160 }}>
  <CfImage src={coverUrl} alt="단지 조감도" fill sizes="(max-width:600px) 100vw, 400px" />
</div>
  • CF imagedelivery URL이면 sm/md/lg srcset 자동, 기본 src /md. 비-CF(로컬 SVG·외부)면 변형 없이 그대로.
  • placeholder(로더): 'blur'(기본, CF thumbnail 흐림) | 'skeleton'(shimmer) | 'image' | 'none'. 로딩 중 표시 후 onLoad 페이드인.
    • 'image' + loaderImage="<url>": 로딩 중 가운데 커스텀 이미지(브랜드 스피너/로고 등).
    • loader={<MySpinner/>}: 임의 ReactNode를 로더로 직접 주입(최우선). loaderBackground로 배경색 지정.
  • priority로 LCP 즉시 로드. fill/sizes/width/height/loading/onError/style 등 next/image·<img> 호환.
  • "use client" — 서버 컴포넌트에서도 직접 렌더 가능(자체 클라이언트 경계).

import Image from "@roottale/cms-media/react"(default)로 받아 기존 next/image 호출부를 그대로 두는 drop-in 교체도 가능.

서버 헬퍼 (@roottale/cms-media)

  • variantUrl(config, imageId, variant) / allVariantUrls — image id 기반 variant URL.
  • cfImageVariant(url, variant) / cfImageSrcSet(url) / isCfImageUrl(url) — full delivery URL 변형 교체(렌더용, server/client 공용).
  • r2KeyForTenant, normalizeFilename, R2/S3 클라이언트 인터페이스 — 업로드(R2 원본 → CF Images upload-via-URL) 구현용.

변형명/픽셀: thumbnail 96 · sm 320 · md 768 · lg 1600 (ADR-0034 §7.1.1).