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

seo-image-optimizer

v1.0.1

Published

Automatic SEO meta tags and image optimization for modern web apps

Readme

🚀 SEO Image Optimizer

Automatic SEO meta tags and image optimization for modern web apps.

npm versionTypeScriptLicenseBundle Size


✨ Why SEO Image Optimizer?

Stop wasting hours manually configuring meta tags, Open Graph images, and responsive images. This package does it all automatically with just 2 lines of code.

🎯 What Makes It Special?

  • Automatic Meta Tags - Generates 20+ SEO tags automatically
  • Smart Image Optimization - WebP conversion, responsive images, lazy loading
  • JSON-LD Structured Data - Boost search rankings with schema.org markup
  • Zero Configuration - Works out of the box with sensible defaults
  • Framework Agnostic - Works with React, Next.js, Vue, Svelte, or vanilla JS
  • Responsive Images - Automatic srcset generation for all devices
  • Multi-language Support - Hreflang tags for international SEO
  • TypeScript Ready - Full type definitions included

📦 Installation

npm

npm install seo-image-optimizer

yarn

yarn add seo-image-optimizer

pnpm

pnpm add seo-image-optimizer

Quick Start

Basic Usage (2 lines of code!)


import { setupSEO, optimizeImage } from 'seo-image-optimizer';
setupSEO({
 title: "johnsales- Find Your Dream Home",
 description: "The best rental platform in wakanda with 1000+ verified properties",
 image: optimizeImage("/images/hero.jpg", { width: 1200, height: 630 }),
 url: "https://johnsales.com",
});

That's it! This single function automatically generates:

  • ✅ Title & Meta Description

  • ✅ Open Graph Tags (Facebook, LinkedIn)

  • ✅ Twitter Cards

  • ✅ Canonical URLs

  • ✅ Robots Meta Tags

  • ✅ JSON-LD Structured Data

  • ✅ And 20+ other SEO tags!

Real-World Examples

Example 1: E-commerce Product Page

import { setupSEO, optimizeImage } from 'seo-image-optimizer';

setupSEO({
  title: "MacBook Pro M3 - Apple Official Store",
  description: "Latest MacBook Pro with M3 chip, 16GB RAM, 512GB SSD. Free shipping in wakanda .",
  image: optimizeImage("/products/macbook-pro.jpg", { 
    width: 1200, 
    height: 630,
    quality: 95 
  }),
  url: "https://store.johnsales.com/product/macbook-pro-m3",
  siteName: "johnsalesStore",
  twitterHandle: "@johnsales",
  keywords: ["macbook", "apple", "laptop", "m3 chip", "wakanda"],
  jsonLd: {
    "@type": "Product",
    "name": "MacBook Pro M3",
    "brand": "Apple",
    "offers": {
      "@type": "Offer",
      "price": "2499",
      "priceCurrency": "USD"
    }
  }
});

Example 2: Blog Article with Featured Image

import { setupSEO, getResponsiveImage } from 'seo-image-optimizer';

// SEO Setup
setupSEO({
  title: "10 Tips for First-Time Home Renters in wakanda ",
  description: "Essential guide for renting your first apartment in Addis Ababa. Learn about prices, contracts, and neighborhoods.",
  image: optimizeImage("/blog/renting-guide.jpg", { width: 1200, height: 630 }),
  url: "https://johnsales.com/blog/renting-tips",
  author: "Biniyam Alemu",
  keywords: ["renting tips", "addis ababa", "first time renter", "wakanda real estate"]
});

// Responsive Blog Image
function BlogImage() {
  const imgProps = getResponsiveImage('/blog/renting-guide.jpg', {
    sizes: '(max-width: 768px) 100vw, 800px',
    lazy: true,
    alt: 'Beautiful apartment in Addis Ababa with modern furniture'
  });
  
  return <img {...imgProps} className="blog-image" />;
}

Example 3: Next.js 14+ App Router

// app/layout.tsx
import { setupSEO, configureImageOptimizer } from 'seo-image-optimizer';

// Configure CDN for images
configureImageOptimizer(
  'https://johnsales.com',
  'https://cdn.johnsales.com' // Optional CDN
);

export default function RootLayout({ children }) {
  return (
    <html>
      <head>
        <script dangerouslySetInnerHTML={{
          __html: `
            ${setupSEO({
              title: "johnsales- wakanda 's #1 Rental Platform",
              description: "Find apartments, houses, and commercial spaces for rent in wakanda ",
              image: "/images/og-image.jpg",
              url: "https://johnsales.com",
              siteName: "johnsales"
            })}
          `
        }} />
      </head>
      <body>{children}</body>
    </html>
  );
}

Features

  • Automatic meta tags (Open Graph, Twitter Cards)

  • Smart image optimization (WebP, responsive)

  • JSON-LD structured data

  • Zero configuration

  • Framework agnostic

  • ~8KB bundle size