Overview
The Siloé Perú website uses images throughout the gallery sections, backgrounds, and interactive flip cards. All images are stored in subdirectories within theimg folder alongside the source files.
Image Directory Structure
Images are organized in two main directories:Supported Image Formats
The website supports standard web image formats:- PNG - Best for logos, graphics with transparency
- JPG/JPEG - Best for photographs
- SVG - Best for vector graphics and icons
- GIF - For simple animations
- WebP - Modern format for better compression (recommended)
Hero Background Image
Main Hero Banner
Location:index.html:17
Prepare your image
Use a high-quality image (at least 1920x1080px) that represents your organization
Add to img voluntario folder
Save your image in
~/workspace/source/img voluntario/ with a descriptive name like hero-background.jpgGallery Images - Volunteer Section
The volunteer gallery includes flip cards with images on the front. Each card shows a story when clicked.Gallery Image Structure
Example:index.html:68-84
Current Volunteer Gallery Images
| Image File | Line | Description |
|---|---|---|
img2.png | 71 | Volunteers helping |
img entrega de pañales.jpg | 89 | Delivery of supplies |
img voluntario navidad.jpg | 107 | Christmas volunteering |
img voluntario navidad2.2 | 125 | Christmas hope |
540412289_18218662465307271_3984022991253073857_n.png | 143 | Family support |
img voluntarios navidad 2.1 | 161 | Creating memories |
Gallery Images - Clown Section
The clown section has its own gallery showcasing the clown volunteer program.Current Clown Gallery Images
| Image File | Line | Size Class | Description |
|---|---|---|---|
568201215_18225647026307271_8015100808044120281_n.png | 273 | Small | Transforming smiles |
606679523_18233751487307271_2653071027915695311_n.png | 292 | Small | Clowns in action |
570037802_18225646981307271_7083655908308813644_n.png | 311 | Small | Therapeutic joy |
641773809_18241087081307271_7081150706072675463_n.png | 330 | Small | Shared laughter |
620990517_18237125605307271_569971132472878260_n.png | 349 | Small | Heart magic |
641776311_18241087003307271_2305698428489149300_n.png | 368 | Small | Hope and fun |
642631975_18241087042307271_3713862490567410574_n.png | 387 | Small | Red nose volunteers |
ultima clow.png | 406 | Small | Last experience |
Some gallery items use the
galeria-item-grande class (lines 104, 122) which makes them span 2 columns on larger screens. You can add or remove this class to control gallery layout.Replacing Gallery Images
Prepare your images
- Use high-quality photos (minimum 800x800px)
- Crop to square aspect ratio (1:1) for consistency
- Optimize file size (aim for under 200KB per image)
Add images to appropriate folder
- Volunteer images:
~/workspace/source/img voluntario/ - Clown images:
~/workspace/source/img clow/
Adding New Gallery Items
To add more images to the gallery:Copy an existing gallery item
Copy the entire
<div class="galeria-item"> block (including all nested divs)Paste before closing gallery-grid
Insert the copied block before
</div><!-- closing galeria-grid -->Example: Adding a New Volunteer Gallery Item
Large Gallery Items
Some gallery items can span 2 columns and 2 rows on larger screens using thegaleria-item-grande class.
- Line 104: Volunteer Christmas photo
- Line 122: Hope medicine photo
WhatsApp Button Icon
Current Icon
Location:index.html:715
Customizing the WhatsApp Button
Prepare icon image
- Use a square image (recommended: 120x120px)
- PNG format with transparency works best
- Can be WhatsApp logo or custom messaging icon
Replace image file
Save your new icon as
img logo de mensajeria.png or use a new filename and update the HTMLUpdate WhatsApp number
Change
51930917199 to your organization’s WhatsApp number (with country code, no spaces):Image Optimization
Why Optimize?
Unoptimized images can:- Slow down page load times
- Consume excessive bandwidth
- Hurt SEO rankings
- Provide poor mobile experience
Optimization Guidelines
Hero Background
- Format: JPG or WebP
- Dimensions: 1920x1080px
- File size: Under 300KB
Gallery Photos
- Format: JPG or WebP
- Dimensions: 800x800px
- File size: Under 150KB
Icons
- Format: PNG or SVG
- Dimensions: 120x120px
- File size: Under 20KB
Logos
- Format: PNG or SVG
- Dimensions: Variable
- File size: Under 50KB
Optimization Tools
Online Tools:- TinyPNG - PNG and JPG compression
- Squoosh - Advanced image optimization
- ImageOptim - Mac app for batch optimization
- JPEG-Optimizer - JPG optimization
Resize to appropriate dimensions
Don’t use images larger than needed. Gallery images rarely need to exceed 800x800px.
Responsive Images
The gallery automatically adapts to different screen sizes thanks to CSS: Gallery Grid:style.css:1356-1362
style.css:1365-1373
aspect-ratio: 1 ensures all images maintain a square shape regardless of original dimensions.
Image Alt Text Best Practices
Why Alt Text Matters
- Accessibility - Screen readers use alt text to describe images to visually impaired users
- SEO - Search engines use alt text to understand image content
- Fallback - Displays when images fail to load
Writing Good Alt Text
✅ Good
❌ Bad
Alt Text Guidelines
- Be descriptive - Explain what’s in the image
- Be concise - Aim for 125 characters or less
- Include context - Explain why the image matters
- Skip “image of” - Screen readers already announce “image”
- Don’t use decorative images - Use
alt=""for purely decorative images
Testing Your Images
Visual inspection
Check all images display correctly across the site:
- Hero background
- Volunteer gallery (6 images)
- Clown gallery (8 images)
- WhatsApp button icon
Test responsive behavior
Resize browser window or use device emulation to verify:
- Images scale properly
- Gallery grid adjusts to screen size
- No images appear stretched or pixelated
Test flip card functionality
Click each gallery image to ensure:
- Flip animation works smoothly
- Story text is readable on the back
- Images don’t distort during flip
Check load performance
Use browser dev tools to:
- Verify image file sizes are reasonable
- Check total page load time
- Ensure images load progressively
Troubleshooting
Image not displaying
Image not displaying
- Verify the file path is correct (check spelling and directory)
- Ensure the image file exists in the specified location
- Check file name matches exactly (case-sensitive)
- Verify image format is supported (.jpg, .png, .gif, .svg, .webp)
- Check browser console for 404 errors
Image looks stretched or distorted
Image looks stretched or distorted
- Use square images (1:1 aspect ratio) for gallery items
- The CSS
aspect-ratio: 1forces square display - Pre-crop images to square before uploading
- Use
object-fit: coverin CSS if you must use non-square images
Flip card not working
Flip card not working
- Ensure you haven’t accidentally deleted the JavaScript at the bottom of
index.html(lines 830-854) - Check browser console for JavaScript errors
- Verify the complete HTML structure is intact for flip cards
- Clear browser cache and reload
Images loading slowly
Images loading slowly
- Optimize images to reduce file size
- Use appropriate dimensions (don’t use 4000px images for 800px display)
- Consider using WebP format for better compression
- Implement lazy loading for below-the-fold images
WhatsApp button not showing
WhatsApp button not showing
Advanced: Lazy Loading Images
For better performance, you can implement lazy loading for gallery images:loading="lazy" attribute tells the browser to only load images when they’re about to enter the viewport.
Related Documentation
- Content Customization - Update gallery story text
- Colors Customization - Change gallery overlay colors
- Forms Customization - Add image upload to forms