Improve media loading performance for posts by enabling lazy loading

Added 'loading="lazy"' attribute to media elements in the new-post page to optimize image and video loading.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: ae4037a0-2a6f-4530-9bac-79b543286bda
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/397bca8c-984f-43ff-841a-10897aeb8140/ae4037a0-2a6f-4530-9bac-79b543286bda/F3F3s9V
This commit is contained in:
michaelschal committed 2025-10-14 07:55:51 +00:00
1 parent db45b98e5d
commit a2379b2f79
1 file changed
+2
+2
View File
@@ -78,6 +78,7 @@ function SortableMediaItem({
src={media.facebookFeedUrl || media.originalUrl}
alt={media.fileName}
className="w-full h-full object-cover"
loading="lazy"
/>
</button>
{isSelected && (
@@ -513,6 +514,7 @@ export default function NewPost() {
src={media.facebookFeedUrl || media.originalUrl}
alt={media.fileName}
className="w-full h-full object-cover"
loading="lazy"
/>
{isSelected && (
<div className="absolute inset-0 bg-primary/10 flex items-center justify-center">