web-images
Creative and technical patterns for using images in web development. Use when building UIs that incorporate photography.
What this skill does
# Image Techniques for Web Development
Don't just slap a stock photo hero on a white background. Images should be **intentional**, **unexpected**, and **integrated** into the design—not decorative afterthoughts.
## Philosophy
- **Avoid the cliché**: Full-bleed hero with centered text over a generic office/laptop photo = instant AI slop. If you've seen it a thousand times, don't do it.
- **Images as design elements**: Crop aggressively. Use clip-paths. Let images bleed off edges. Overlap with other elements. Break the grid.
- **Commit to a treatment**: If you're going grayscale, go ALL grayscale. If you're using duotone, make it bold. Half-measures look accidental.
- **Negative space is powerful**: One striking image with breathing room beats a cluttered gallery.
- **Motion creates life**: Subtle parallax, hover reveals, scroll-triggered animations. Static grids feel dead.
## Layout Patterns
| Pattern | When to Use | Avoid |
|---------|-------------|-------|
| **Bento/Masonry** | Portfolios, galleries, visual storytelling | Perfect uniformity—vary the sizes |
| **Full-bleed hero** | High-impact landing, bold statement | Generic stock + centered white text |
| **Split screen** | Product + description, before/after | 50/50 feels safe—try 60/40 or overlap |
| **Overlapping** | Editorial, modern, dynamic feel | Messy collision—be intentional |
| **Diagonal/clip-path** | Energy, movement, breaking monotony | Overuse—one per page max |
## Visual Effects (CSS)
```css
/* Glassmorphism - text over busy images */
backdrop-filter: blur(12px);
background: rgba(255,255,255,0.1);
/* Duotone/color overlay */
mix-blend-mode: multiply; /* on image over colored bg */
/* Grayscale with color on hover */
filter: grayscale(100%);
transition: filter 0.3s;
&:hover { filter: grayscale(0); }
/* Diagonal crop */
clip-path: polygon(0 0, 100% 0, 100% 85%, 0 100%);
/* Gradient fade for text readability */
background: linear-gradient(transparent, rgba(0,0,0,0.8));
```
## Technical Essentials
```html
<!-- Always lazy load below-the-fold images -->
<img src="photo.jpg" loading="lazy" alt="Description">
<!-- Responsive images - serve right size -->
<img
srcset="photo-400.jpg 400w, photo-800.jpg 800w, photo-1200.jpg 1200w"
sizes="(max-width: 600px) 400px, 800px"
src="photo-800.jpg"
alt="Description"
>
<!-- WebP with fallback -->
<picture>
<source srcset="photo.webp" type="image/webp">
<img src="photo.jpg" alt="Description">
</picture>
```
```css
/* Image fills container without distortion */
img {
width: 100%;
height: 100%;
object-fit: cover;
object-position: center; /* adjust focal point */
}
/* Consistent aspect ratios */
aspect-ratio: 16 / 9; /* hero/banner */
aspect-ratio: 1 / 1; /* thumbnails, avatars */
aspect-ratio: 4 / 3; /* cards */
```
```jsx
// Next.js - automatic optimization
import Image from 'next/image'
<Image src="/photo.jpg" alt="" fill className="object-cover" placeholder="blur" />
```
## Quick Decisions
- **Hero**: Does it NEED a photo? Sometimes bold typography alone is stronger.
- **Gallery**: Masonry > uniform grid. Vary sizes. Add hover effects.
- **Cards**: `object-fit: cover` + `aspect-ratio` = consistent without distortion.
- **Text over image**: Use gradient overlay or glassmorphism. Never raw text on busy photo.
- **Loading**: Lazy load everything. Skeleton pulse for placeholders. Blur-up for heroes.
Related in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.