image-optimization-requirements

image-optimization-requirements is a cursor rule for Cursor from adobecom/da-express-milo. It costs 2,985 tokens per session, scanned A, original, Apache-2.0.

A set of rules for optimizing webpage images according to a staged loading plan and a limited amount of data allowed before the main content appears.

In plain words
What is it for?
Use it to configure first-section images for early loading, suitable dimensions, high priority, and responsive delivery within the defined loading budget.
Why use it?
It helps prevent large or late-loading images from delaying the first visible section and its Largest Contentful Paint measurement.

Cursor rule for Cursor

Written for Cursor: installed under .cursor/.

Good fit Use it to configure first-section images for early loading, suitable dimensions, high priority, and responsive delivery within the defined loading budget.

Compare 6 cursor rules from other repositories ↓
Install with agentmods
npx agentmods add rules/adobecom/da-express-milo/image-optimization-requirements
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/adobecom/da-express-milo

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for image-optimization-requirements

README.md
[![agentmods](https://agentmods.dev/badge/rules/adobecom/da-express-milo/image-optimization-requirements/github.svg)](https://agentmods.dev/rules/adobecom/da-express-milo/image-optimization-requirements)
Your own site
<a href="https://agentmods.dev/rules/adobecom/da-express-milo/image-optimization-requirements"><img src="https://agentmods.dev/badge/rules/adobecom/da-express-milo/image-optimization-requirements/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for image-optimization-requirements

Your own site · 80×15
<a href="https://agentmods.dev/rules/adobecom/da-express-milo/image-optimization-requirements"><img src="https://agentmods.dev/badge/rules/adobecom/da-express-milo/image-optimization-requirements.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,985 This file is loaded in full into every session.
When invoked 2,985 The same file — it is already loaded in full.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.02985 $0.02985
Opus 5.5 $0.01194 $0.01194
Sonnet 5.5 $0.00597 $0.00597
Haiku 4.5 $0.00298 $0.00298

Measured 3mo ago against content hash f1b0e9cfc893, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

image-optimization-requirements scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3mo ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

Origin

Copies of this mod

1 near-identical copy found in the catalogue:

.cursor/rules/image-optimization-requirements.mdc · 370 lines

How it starts

The opening of the file, as written. The whole thing — 370 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Image Optimization Performance Rules - Three-Phase Strategy

APPLY: EVERY QUERY - CRITICAL PERFORMANCE RULE

AEM Bandwidth Budget Management (CRITICAL)

Based on AEM's performance guidelines:

  • 100kb total payload before LCP including all images, CSS, JS
  • Single origin only before LCP (no CDN/external image connections)
  • LCP target: 1560ms on mobile for Lighthouse 100 score

Phase E (Eager) - LCP Image Optimization (REQUIRED)

For first section hero/marquee images that are LCP candidates:

// ✅ REQUIRED for LCP candidate images (Phase E)
const optimizeLCPImage = (img, block) => {
  const isFirstSection = block.closest('.section') === document.querySelector('.section');
  const isFirstImage = img === block.querySelector('img');

  if (isFirstSection && isFirstImage) {
    // Phase E: Critical LCP optimization
    img.removeAttribute('loading');
    img.setAttribute('loading', 'eager');
    img.setAttribute('fetchpriority', 'high');

    // Calculate optimal size for bandwidth budget
    const optimalWidth = getOptimalImageSize();
    const aspectRatio = getImageAspectRatio(img);

    img.setAttribute('width', optimalWidth);
    img.setAttribute('height', Math.round(optimalWidth * aspectRatio));

    // Preload only if within bandwidth budget
    const estimatedSize = estimateImagePayload(img.src, optimalWidth);
    if (payloadTracker.canLoadResource(estimatedSize)) {
      preloadLCPImage(img.src, optimalWidth);
    } else {
      console.warn('LCP image exceeds bandwidth budget, consider optimization');
    }
  }
};

// ✅ REQUIRED - Bandwidth-aware image preloading
const preloadLCPImage = (src, width) => {
  const link = document.createElement('link');
  link.rel = 'preload';
  link.as = 'image';
  link.href = `${src}?width=${width}&format=webply&optimize=medium`;
  link.fetchPriority = 'high';
  document.head.appendChild(link);
};

Bandwidth Budget Calculation (REQUIRED)

Read the full file on GitHub · 370 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3mo ago First seen · 370 lines · 2,985 tokens per session scan A f1b0e9cfc893

Subscribe to this mod's changes

image-optimization-requirements is a cursor rule published in the GitHub repository adobecom/da-express-milo (6 stars, last pushed yesterday), licensed Apache-2.0. It adds 2,985 tokens to every session, about $0.0119 per session on Opus 5.5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

image-optimization-requirements compared with cursor rules from other repositories

image-optimization-requirements next to 6 cursor rules from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
image-optimization-requirementsadobecom/da-express-miloCursor rule6yesterdayApache-2.0A2,985Cursor
ponytailDietrichGebert/ponytailCursor rule203k10d agoMITA604Cursor
angular-20angular/angularCursor rule102ktodayMITA0Cursor
dev-standardapache/supersetCursor rule76ktodayApache-2.0A1,147Cursor
prefer-assertions-over-defensive-checksprisma/ormCursor rule48ktodayApache-2.0A0Codex, Cursor
prefer-direct-imports-over-module-mocksprisma/ormCursor rule48ktodayApache-2.0A0Codex, Cursor
shared-plane-packagesprisma/ormCursor rule48ktodayApache-2.0A0Codex, Cursor