New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 900613 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Last visit > 30 days ago
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Feature



Sign in to add a comment

"imag-compression" violation for "fetch"-ed images

Project Member Reported by ekaramad@chromium.org, Oct 31

Issue description

The policy promises to track bytes/pixel; but the downloaded image content does not necessarily end up in an <img>. It could be an unattached Image or, drawn into a canvas, e.g.:
<canvas/>
<script>
fetch(big_image).then((response) => response.blob()).then((blob) => {
  let url = document.createObjectURL(blob);
  var ctx = document.querySelector("canvas").getContext("2d");
  var image = new Image();
  img.src = url;
  img.onload = () => {
    ctx.drawImage(img, 0, 0);
  };
</script>

I think the policy should report violation as soon as a downloaded image violates the size limit. Also the enforcement should include canvases.
 
Labels: -Type-Bug Type-Feature
Owner: lunalu@chromium.org
Status: Assigned (was: Untriaged)
Owner: loonyb...@chromium.org

Sign in to add a comment