···732732 let cid = blob.inner.ref_.link.clone();
733733 let size = blob.inner.size as usize;
734734735735+ // Store the header image locally in content storage immediately
736736+ // This ensures the image is available when the event is created/edited,
737737+ // without waiting for store_event_header_from_pds to download from PDS
738738+ let image_path = format!("{}.png", cid);
739739+ if let Err(err) = web_context
740740+ .content_storage
741741+ .write_content(&image_path, &processed_data)
742742+ .await
743743+ {
744744+ tracing::warn!(
745745+ ?err,
746746+ cid = %cid,
747747+ "Failed to store event header image locally, will be fetched from PDS later"
748748+ );
749749+ }
750750+735751 // Return JSON response with CID, dimensions, and size
736752 let response = UploadHeaderResponse {
737753 cid,