Other mistake: When Miguel is singing "Un poco loco" on stage, he goes out of range of the mic, but his voice is amplified.
Other mistake: Miguel was drowning in the swimming pool in De La Cruz's party but when he was thrown in the pit he managed to swim out of it.
Answer: It is never really explained in the movie, but we could assume that whenever someone dies they keep whatever items they had on them. Hector may have had the photo on his person when he died.