Back to Examples
What are Image Utilities?
RSL provides a comprehensive set of utility classes to control image sizing, shape, styling, and responsive behavior—all without writing custom CSS.
2-Minute Setup
1 Include Files
Required Files • HTML
2 Add Classes to Images
Example • HTML
✓ Done! Your image is now responsive, rounded, and has a shadow.
Complete Class Reference
Size Classes
| Class | Effect |
.responsive-img | Scales to 100% of container width |
.max-width-100 | Max width 100px |
.max-width-200 | Max width 200px |
.max-width-300 | Max width 300px |
.max-width-400 | Max width 400px |
.max-width-500 | Max width 500px |
.min-width-100 | Min width 100px |
.min-width-200 | Min width 200px |
.min-width-300 | Min width 300px |
.thumbnail | Max width 150px (thumbnail size) |
.full-width | Forces 100% width |
Shape Classes
| Class | Effect |
.rounded-sm | Small rounded corners (4px) |
.rounded | Medium rounded corners (8px) |
.rounded-lg | Large rounded corners (16px) |
.circle | Circular image (50% border-radius) |
Style Classes
| Class | Effect |
.bordered | Adds border with padding |
.shadow | Adds subtle drop shadow |
.center | Centers image horizontally |
.grayscale | Grayscale filter (color on hover) |
Aspect Ratio Classes
| Class | Effect |
.aspect-square | Forces 1:1 aspect ratio |
.aspect-video | Forces 16:9 aspect ratio |
Common Combinations
Profile Photo: class="circle shadow max-width-200"
Thumbnail Gallery: class="thumbnail rounded"
Hero Image: class="responsive-img"
Product Image: class="responsive-img rounded bordered"
Pro Tips
✨ Tip 1: Combine multiple classes: responsive-img rounded shadow
✨ Tip 2: Use .responsive-img for most images to ensure mobile-friendly scaling
✨ Tip 3: .circle works best with square images (1:1 aspect ratio)
✨ Tip 4: Use .center for standalone images in text content
✨ Tip 5: .grayscale adds visual interest to image grids
ADA Compliance
Remember for accessibility:
- ✅ Always include meaningful
alt text
- ✅ Use empty
alt="" for decorative images
- ✅ Ensure sufficient color contrast if text overlays images
- ✅ Images should enhance, not replace, text content
Back to Examples