FIX: Detect decode failures earlier in image optimization pipeline (PR #13595)

Follow up to 9b51b9b but also detects the bug earlier and backs off.

What iOS 15 is doing is returning all zeroes to ctx.getImageData, so we don’t have to wait until resize to detect the problem.

GitHub

  return imageData.data[3] === 0;