If one uploads an image which gets scaled down by WordPress, so that the final image in the HTML output is named with the suffix "scaled.jpeg", the caption will be missing.
Most likely this is caused by the fact, that the image meta data can not be found in the database using this name but only without the "scaled.jpeg" suffix. A fix might by to try the name without the suffix, if no metadata was found.
Also see https://wordpress.org/support/topic/caption-absent-when-image-is-named-scaled-jpeg/#post-15732656
If one uploads an image which gets scaled down by WordPress, so that the final image in the HTML output is named with the suffix "scaled.jpeg", the caption will be missing.
Most likely this is caused by the fact, that the image meta data can not be found in the database using this name but only without the "scaled.jpeg" suffix. A fix might by to try the name without the suffix, if no metadata was found.