diff --git a/components/gallery/ListOfEvents.tsx b/components/gallery/ListOfEvents.tsx index 254de08..179fdbc 100644 --- a/components/gallery/ListOfEvents.tsx +++ b/components/gallery/ListOfEvents.tsx @@ -131,9 +131,13 @@ const ListOfEvents = () => { {/* Image */}
{event.eventtitle} { + e.target.onerror = null; + e.target.src = 'https://via.placeholder.com/400x200?text=No+Image'; + }} />
diff --git a/components/gallery/ListOfUpcomingEvents.tsx b/components/gallery/ListOfUpcomingEvents.tsx index 01114ba..69c1a78 100644 --- a/components/gallery/ListOfUpcomingEvents.tsx +++ b/components/gallery/ListOfUpcomingEvents.tsx @@ -216,6 +216,10 @@ const ListOfUpcomingEvents = () => { src={selectedEvent.image || selectedEvent.eventimageurl} alt={selectedEvent.title} className="w-full max-h-64 object-cover rounded-md mb-4" + onError={(e: any) => { + e.target.onerror = null; + e.target.src = 'https://via.placeholder.com/400x200?text=No+Image'; + }} /> )}