I uploaded some images to the post via the API, why do only some images have the lightbox effect?

I think it should be resolved.
My automation script didn’t have a delay at first, but then I added a 200ms delay to each API call. All the images are now normal.
Thank you!