cloudinary_wordpress icon indicating copy to clipboard operation
cloudinary_wordpress copied to clipboard

Fix DivisionByZeroError in Responsive_Breakpoints

Open aatanasov-cloudinary opened this issue 9 months ago • 0 comments

Fixing DivisionByZeroError occurring in the Responsive_Breakpoints class.

Approach

  • If an attachment doesn't have width or height, 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 width and height.
  • 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.

aatanasov-cloudinary avatar Mar 26 '25 10:03 aatanasov-cloudinary