4 KiB
4 KiB
Manual verification checklist — media pipeline
After code changes to upload conversion + publish flow, run these checks in the running app.
Prerequisites
npm run devrunning- User logged into trypost with:
- At least one Instagram account connected (any flow: standalone or via Facebook)
- At least one Facebook Page connected
- At least one Bluesky account (optional, for the resize test)
Check 1 — PNG upload converts to JPEG at CDN
- Create a new post (or open an existing draft) at
/posts/*/edit - Upload a PNG file (e.g., screenshot, logo with transparency)
- Open browser devtools → Network tab → find the POST to
assets/store - In the response, verify:
mime_type=image/jpegpathends with.jpgurlends with.jpg
- Open the
urlin a new tab — confirms the file is served as JPEG
Check 2 — Metadata propagates
- Upload an image → response
metaobject haswidthandheight(> 0) - Upload a video → response
metahaswidth,height,duration(> 0) - If duration is missing for videos, check devtools console for errors during
readFileMetadata
Check 3 — Instagram publishing (the original bug)
- With the JPEG from Check 1, select Instagram (standalone or via Facebook) as target
- Pick "Feed Post" variant
- Click Post now
- Wait ~10–30 seconds for the async job
- Open the Instagram account in a browser/app — the post should appear
- Back in trypost,
post_platform.statusshould bepublished(notfailed)
Check 4 — GIF validation (frontend)
- Upload a
.giffile - Select Instagram or Facebook — the card should show a red warning: "This platform does not accept GIF..."
- Try clicking "Post now" → button is disabled
- Deselect Instagram/Facebook, select X only → warning disappears, button enabled
- Click "Post now" → GIF publishes to X (animated)
Check 5 — Video duration validation
- Upload a video > 60 seconds (e.g., 2min MP4)
- Select Instagram → pick Reel variant
- Warning shows: "Video is 2min long, but this post type allows up to 15min" (Reel is 15min) — no warning expected here
- Select Story instead → warning: "Video is 2min long, but this post type allows up to 60s"
- Submit button disabled
Check 6 — File size validation
- Upload a large image (> 4MB JPEG — use a high-res photo)
- Select Facebook Post
- Warning appears: "Image exceeds the 4.0 MB limit (yours is X.X MB)"
- Submit disabled
Check 7 — Aspect ratio validation
- Upload a square (1:1) image
- Select Instagram Reel
- Warning appears: "Aspect ratio 1.00 is too wide (max 0.60)" (Reel requires ~9:16)
- Submit disabled
Check 8 — Bluesky iterative resize
- Upload an image > 976 KB that's ALSO a JPEG (not to trigger PNG conversion)
- Select Bluesky only
- Click "Post now"
- Check
storage/logs/laravel.logfor MediaOptimizer entries — should NOT see quality reduction warnings (only dimension reduction if the limit is still exceeded) - Post appears on Bluesky with acceptable quality
Check 9 — Non-normalized video passthrough
- Upload a
.mp4file media.pathin DB/response still has.mp4extension (no conversion attempted)- Publish to any platform that accepts video — works via existing flow
Troubleshooting
-
If Check 1 fails (still PNG in CDN):
- Check
vendor/bin/composer require intervention/imageis installed - Check
storage/logs/laravel.logforHasMedia: image normalization failed - GD or Imagick extension must be loaded in PHP
- Check
-
If Check 3 still fails on Instagram:
- Verify the stored image IS JPEG:
curl -I <url>should returnContent-Type: image/jpeg - Check Instagram error code in
post_platform.error_message; 2207009 = aspect ratio, 2207004 = too large
- Verify the stored image IS JPEG:
-
If videos don't validate in frontend (no warnings):
- Browser must be able to read video metadata (codec-dependent)
- Check devtools console for
readFileMetadataresolving empty{}