Are you able to explain why that happened with the migrations you did? I see the other post you explain the steps you took. I don't understand how that deleted pictures though.
I'm not that great at explaining but here goes: The activity table had some duplicate ap_ids that I guess were used to search for pictures and that delete I did cleared out all duplicates but left the earliest known rows that existed with each ap_id. So, I guess when it searches by ap_id and regular id for the link to the picture in pictrs it comes up blank because it shared an ap_id with another row that doesn't exist anymore and the regular id doesn't match what's in the query.