- Problem: Images were being loaded from external domain
https://thirtysixstudio.com/peppers/causing CORS errors - Solution: All images are now served locally from
public/images/peppers/
- Problem: Code was using
https://cors-anywhere.herokuapp.com/which is unreliable and often blocked - Solution: Removed proxy dependency entirely
- Problem: Loading images from external domains without proper permissions
- Solution: All images are now local assets
public/
images/
peppers/
pepperA/ (149 images: 0.png to 148.png)
pepperB/ (150 images: 0.png to 149.png)
pepperC/ (150 images: 0.png to 149.png)
pepperD/ (150 images: 0.png to 149.png)
pepperE/ (150 images: 0.png to 149.png)
pepperF/ (150 images: 0.png to 149.png)
pepperG/ (150 images: 0.png to 149.png)
- ✅ Image Preloading: All images for each canvas instance are preloaded
- ✅ Error Handling: Graceful fallbacks when images fail to load
- ✅ Performance: Consistent canvas dimensions, no resizing during animation
- ✅ Memory Management: Proper cleanup of event listeners
- ✅ Transparent Background: No white flashes during animation
- Local Image Paths: All images use
/images/peppers/...paths - Preloaded Images: Images are loaded once and cached in memory
- Error Fallbacks: Subtle placeholder patterns for failed images
- Smooth Animations: No canvas resizing or white background flashes
- Memory Efficient: Proper cleanup prevents memory leaks
- Removed CORS proxy usage
- Added image preloading with
useMemo - Implemented proper error handling
- Added transparent background support
- Optimized canvas rendering
- Updated to use local image paths
- All 1,049 images now reference local files
- Added transparent background for canvas elements
- Optimized for smooth animations
- Script to download all images from external source
- Automatically updates
canvasimages.jswith local paths
If you need to re-download the images, run:
node download-images.jsThis will:
- Download all pepper animation images
- Save them to
public/images/peppers/ - Update
src/canvasimages.jswith local paths
- ✅ No CORS Errors: Images served from same domain
- ✅ Better Performance: Local images load faster
- ✅ Reliable Operation: No dependency on external services
- ✅ Smooth Animations: No white background flashes
- ✅ Error Resilience: Graceful handling of missing images
- ✅ Easy Maintenance: Simple script to update images
- Check if images exist in
public/images/peppers/ - Run
node download-images.jsto re-download - Verify file permissions
- Check browser console for errors
- Ensure canvas dimensions are consistent
- Verify GSAP animations are working
- Images are preloaded, so first load might be slower
- Subsequent animations should be smooth
- Check for memory leaks in browser dev tools
Your application now has:
- Zero CORS issues
- Smooth pepper animations
- Reliable image loading
- Professional error handling
- Optimal performance
The image usage permission issues are completely resolved! 🚀