Spaces:
Sleeping
Sleeping
Project Assets Guide
This guide explains how to add images and YouTube videos for your projects.
Image Gallery Setup
Where to Place Images
Place all project images in the public/assets/projects/ directory, organized by project slug:
public/
assets/
projects/
siddhesh-yashoda/
card.jpg (or .webp, .jpeg, .png)
gallery-1.jpg
gallery-2.jpg
gallery-3.jpg
...
jito-nagar/
card.jpg
gallery-1.jpg
gallery-2.jpg
...
Supported Image Formats
The ImageFlex component automatically supports these formats (in order of preference):
.webp.jpgor.jpeg.png
Important: Do NOT include the file extension in your code. The component will automatically find the correct file.
How to Add Gallery Images
In src/pages/Projects.jsx, add a gallery array to each project object:
{
slug: 'siddhesh-yashoda',
title: 'Siddhesh Yashoda',
// ... other fields ...
gallery: [
'/assets/projects/siddhesh-yashoda/gallery-1',
'/assets/projects/siddhesh-yashoda/gallery-2',
'/assets/projects/siddhesh-yashoda/gallery-3',
'/assets/projects/siddhesh-yashoda/gallery-4'
]
}
Note:
- Use paths relative to
public/(start with/assets/) - Do NOT include file extensions (
.jpg,.png, etc.) - The component will automatically find the best available format
Image Slider Features
The image slider includes:
- β Auto-advance every 3 seconds
- β Pause on hover/focus
- β Manual navigation with arrow buttons
- β Fullscreen view
- β Slide indicators (dots)
- β Keyboard accessible
YouTube Walkthrough Videos
How to Add YouTube Links
In src/pages/Projects.jsx, add a youtubeUrl field to each project:
{
slug: 'siddhesh-yashoda',
title: 'Siddhesh Yashoda',
// ... other fields ...
youtubeUrl: 'https://www.youtube.com/watch?v=VIDEO_ID'
}
Supported YouTube URL Formats
The component accepts any of these formats:
Full YouTube URL:
youtubeUrl: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ'Short YouTube URL:
youtubeUrl: 'https://youtu.be/dQw4w9WgXcQ'Direct Video ID:
youtubeUrl: 'dQw4w9WgXcQ'
Walkthrough Section
- The walkthrough section only appears if a
youtubeUrlis provided - Videos are embedded using YouTube's iframe player
- No heavy video files needed - all videos are streamed from YouTube
- Videos load lazily for better performance
Complete Example
Here's a complete example of a project with gallery images and YouTube video:
{
slug: 'example-project',
title: 'Example Project',
location: 'Pune, Maharashtra',
categories: ['Residential'],
section: 'Development',
status: 'Ongoing',
commencement: '2024',
reraCompletion: '2026',
reraNo: 'P52100012345',
image: '/assets/projects/example-project/card',
description: 'A beautiful residential project in the heart of Pune.',
gallery: [
'/assets/projects/example-project/gallery-1',
'/assets/projects/example-project/gallery-2',
'/assets/projects/example-project/gallery-3',
'/assets/projects/example-project/gallery-4',
'/assets/projects/example-project/gallery-5'
],
youtubeUrl: 'https://www.youtube.com/watch?v=VIDEO_ID'
}
File Naming Conventions
Project Card Images
- Location:
public/assets/projects/{project-slug}/card.{ext} - Example:
public/assets/projects/siddhesh-yashoda/card.jpg
Gallery Images
- Location:
public/assets/projects/{project-slug}/gallery-{number}.{ext} - Example:
public/assets/projects/siddhesh-yashoda/gallery-1.jpgpublic/assets/projects/siddhesh-yashoda/gallery-2.webppublic/assets/projects/siddhesh-yashoda/gallery-3.png
Logo Files
- Location:
public/assets/ - Files:
logo.{ext}(for header)logo-white.{ext}(for footer)
Tips
- Image Optimization: Use
.webpformat for best performance, with.jpgas fallback - Image Sizes:
- Card images: ~800x600px recommended
- Gallery images: ~1920x1080px recommended (will be scaled down)
- YouTube Privacy: Use unlisted or public videos. Private videos won't embed.
- Order Matters: Gallery images are displayed in the order they appear in the array