cloudinary_wordpress
cloudinary_wordpress copied to clipboard
Fix DivisionByZeroError in Responsive_Breakpoints
Fixing DivisionByZeroError occurring in the Responsive_Breakpoints class.
Approach
- If an attachment doesn't have
widthorheight, the initial image tag will be rendered on the front-end without any srcset information. - Add a debug log if there is an issue with
widthandheight. - Remove a debug log during syncing attachments.
QA notes
- Upload an image.
- Set its height or width to
0(during coding, a database update was used). - Insert the image to a page.
- Save and preview the page.
- The image should appear without errors.
- The debug log should include information about the attachment.