Stripping out photo size details causes photos to become invalid