Skip to content

Commit

Permalink
Fetch avatars without CORS
Browse files Browse the repository at this point in the history
By omitting the crossOrigin attribute, we change avatars to use a non-CORS request to fetch the image. This allows avatars to load even on null origins (fixing element-hq/element-web#26491), but also prevents us from inspecting the image data in JavaScript, for example by using it in a canvas. We weren't doing that of course, so switching to the locked-down non-CORS mode should have no consequences.
  • Loading branch information
robintown committed May 14, 2024
1 parent aad4342 commit 5f0b5bd
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/components/Avatar/Avatar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ export const Avatar = forwardRef<
loading="lazy"
alt=""
src={src}
crossOrigin="anonymous"
referrerPolicy="no-referrer"
className={classnames(styles.image)}
data-type={type}
Expand Down

0 comments on commit 5f0b5bd

Please sign in to comment.