toeverything/AFFiNE · error · Error

Image processing failed. This can happen if fingerprint prot

Error message

Image processing failed. This can happen if fingerprint protection is enabled in your browser. Please check your browser settings and try again.

What it means

decodeAndReduceImage wraps image-blob-reduce failures (images >10MB or >4000px) and rethrows with a user-facing explanation, commonly caused by canvas fingerprint protection in privacy browsers blocking pixel data access.

Source

Thrown at packages/frontend/core/src/utils/reduce-image.ts:34

    img.onload = img.onerror = () => {
      URL.revokeObjectURL(url);
    };

    const sizeInMB = file.size / (1024 * 1024);
    if (sizeInMB > 10 || img.width > 4000 || img.height > 4000) {
      // Compress the file to less than 10MB

      try {
        const compressedImg = await reduce().toBlob(file, {
          max: 4000,
          unsharpAmount: 80,
          unsharpRadius: 0.6,
          unsharpThreshold: 2,
        });
        return compressedImg;
      } catch (error) {
        if (error instanceof Error) {
          throw new Error(
            'Image processing failed. This can happen if fingerprint protection is enabled in your browser. Please check your browser settings and try again.'
          );
        } else {
          throw new Error('Unknown error occurred');
        }
      }
    }

    return file;
  };

  const reducedBlob = await decodeAndReduceImage();

  return new File([reducedBlob], file.name, {
    type: file.type,
    lastModified: file.lastModified,
  });
};

View on GitHub (pinned to b4c8548c09)

Solutions

  1. Disable browser fingerprint protection for this site and retry.
  2. Try a different browser or grant canvas read permission.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: Thrown in validateAndReduceImage when image-blob-reduce's toBlob compression fails for an image over 10MB or larger than 4000px, e.g. when canvas access is blocked by browser fingerprint protection.

Common situations: Compressing a large image fails, commonly because browser fingerprint/canvas protection blocks image processing. Disable fingerprint protection for the site or upload a smaller image.


AI-assisted analysis of toeverything/AFFiNE@b4c8548c09 (2026-08-18). Data as JSON: /api/errors/5ccd76cd5c4b54a7. Report an issue: GitHub.