landing-page-image-quality-cursorrules-prompt-file — Cursor rule
Stops Cursor from injecting placeholder image URLs into user-facing pages, requiring real project assets, fixed dimensions, and valid alt attributes.
.cursor/rules/landing-page-image-quality-cursorrules-prompt-file.mdcWhat landing-page-image-quality-cursorrules-prompt-file does
This rule instructs Cursor to avoid placeholder domains such as placehold.co, dummyimage.com, and picsum.photos. The model must use committed repository assets, interface screenshots, or pre-approved URLs instead. Before adding any external visual, the agent has to confirm licensing terms and skip hotlinking arbitrary sources.
The instructions enforce layout stability. Images need explicit width and height tags or CSS aspect-ratio rules to prevent sudden shifts while loading. Accessibility is also checked: informative graphics require descriptive alt tags, while purely decorative items get empty ones. If your repository lacks local assets, the agent will stop short because dummy image services are banned.
What it helps with
- Block placeholder URLs like placehold.co from reaching production code
- Prevent layout shifts by enforcing fixed dimensions or aspect ratios
- Enforce accessibility standards with context-specific alt attributes
- Avoid copyright violations by verifying image licensing before inclusion
Example prompts for the agent
- Build the feature section for the landing page using graphics from the assets/ folder
- Audit the pricing table images for missing dimensions and empty alt attributes
- Replace external placeholder links with our committed SVG icons and test responsive styling
How to install landing-page-image-quality-cursorrules-prompt-file
Manually: put the files in place
.cursor/rules/landing-page-image-quality-cursorrules-prompt-file.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.claude/rules/landing-page-image-quality-cursorrules-prompt-file.mdThe paths frontmatter field limits the files: move globs from the source into paths
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.github/instructions/landing-page-image-quality-cursorrules-prompt-file.instructions.mdThe applyTo field sets which files it applies to: move globs from the source into applyTo
Manually: put the files in place
.devin/rules/landing-page-image-quality-cursorrules-prompt-file.mdManually: put the files in place
.clinerules/landing-page-image-quality-cursorrules-prompt-file.mdStep by step, with commands for each platform: Cursor rules: .mdc files, four modes and what replaced .cursorrules
Questions about landing-page-image-quality-cursorrules-prompt-file
How to install landing-page-image-quality-cursorrules-prompt-file in Cursor?
Add the rule file at .cursor/rules/landing-page-image-quality-cursorrules-prompt-file.mdc in your workspace repository.
What does this rule do?
It stops Cursor from using fake image links, directing it toward verified repository assets. It also checks dimensions for layout stability, confirms licensing, and requires descriptive alt tags.
Which placeholder services are explicitly banned?
The rule forbids placehold.co, via.placeholder.com, dummyimage.com, picsum.photos, and random external image URLs.
Source text
landing-page-image-quality-cursorrules-prompt-file.mdc · CC0-1.0
--- description: "Cursor rules for avoiding placeholder or broken image URLs, using stable visual assets, and checking alt text, dimensions, licensing, and responsive behavior." globs: **/* alwaysApply: false --- # Landing Page Image Quality When generating or editing user-facing pages, use real, relevant visual assets instead of placeholder image services. ## Image Sources - Do not commit `placehold.co`, `via.placeholder.com`, `dummyimage.com`, `picsum.photos`, random image URLs, or broken/deprecated image services. - Prefer committed project assets, product screenshots, generated assets approved by the user, or stable URLs from an approved image provider. - Before using a third-party image, confirm the license and attribution requirements are compatible with the project. - Avoid hotlinking images from arbitrary websites. ## Asset Quality - Match images to the actual content, product, place, object, or user state they represent. - Do not use vague atmospheric images when the user needs to inspect a product, feature, workflow, or interface. - Use consistent aspect ratios for repeated cards or gallery items. - Provide explicit `width` and `height` attributes or CSS aspect-ratio constraints to prevent layout shift. - Use optimized formats and sizes appropriate for the target framework. ## Accessibility - Every informative image must have specific `alt` text that describes the image's purpose in context. - Decorative images must use empty alt text and should not be announced to assistive technology. - Do not put essential text only inside an image. ## Implementation Checks - Ensure image paths resolve in the built application. - Check responsive behavior at mobile and desktop widths. - Verify that loading, error, and empty states do not leave broken image icons in production UI.
© PatrickJS · CC0-1.0 · PatrickJS/awesome-cursorrules