Skip to content

fix(frontend): stop empty avatar src reporting failed image loads - #3738

Merged
kolaente merged 2 commits into
mainfrom
fix-empty-avatar-src
Sep 4, 2026
Merged

fix(frontend): stop empty avatar src reporting failed image loads#3738
kolaente merged 2 commits into
mainfrom
fix-empty-avatar-src

Conversation

@tink-bot

@tink-bot tink-bot commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Avatar components hold '' as "not loaded yet", bind straight to :src. Vue render src="". Per HTML spec empty src fire error immediately, no fetch, and img.src reflect page URL. So sentry resource-error listener report Failed to load image: https://app.vikunja.cloud/tasks/409653 on every avatar mount. ~189k events.

Fix: avatar refs hold undefined, never '' — Vue omit attribute whole. Listener also skip img with empty or '#' src (tiptap image placeholder).

Fixes Sentry issue FRONTEND-OSS-263.

How to verify

  1. Open a task detail view that has comments and assignees, with devtools open.
  2. Inspect an avatar <img> in the elements panel before its blob URL resolves.
  3. Expected: the element has no src attribute at all (not src=""), and no image error event fires for it, so nothing is reported to Sentry.

Before this PR: every avatar rendered src="", fired an error event, and reported the current page URL as a failed image load.

Avatar components used '' as their "not loaded yet" value and bound it
straight to :src. Vue renders src="" for an empty string, which the
browser resolves to the current document URL and immediately fires an
error event for, without any request. That made every avatar mount
report "Failed to load image: <page url>" to Sentry.

fetchAvatarBlobUrl now resolves to undefined instead of '', and all
consumers hold undefined until an avatar resolves, so Vue omits the
src attribute entirely.
An <img> with an empty or '#' src (the tiptap image placeholder) fires
an error event with img.src reflecting the page URL, which the resource
error listener reported as a failed image load.
@github-actions github-actions Bot added area/avatars User avatar providers (Gravatar, LDAP, upload) and rendering area/frontend Frontend-only code or UI work labels Sep 4, 2026
@kolaente
kolaente enabled auto-merge (rebase) September 4, 2026 21:09
@github-actions github-actions Bot added the auto-merge PR has GitHub auto-merge enabled label Sep 4, 2026
@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Preview Deployment

Preview deployments for this PR are available at:

URL Tag Commit
https://pr-3738.preview.vikunja.dev ghcr.io/go-vikunja/vikunja:pr-3738 latest
https://sha-de42aac562586bfac0d2d608a007b08fc632f829.preview.vikunja.dev ghcr.io/go-vikunja/vikunja:sha-de42aac562586bfac0d2d608a007b08fc632f829 de42aac

The preview environment will start automatically on first visit. Subsequent pushes to this PR will update the pr-3738 image — the preview picks up the new version on restart. The per-commit URLs point to a specific version and will not change.

Run locally with Docker
docker pull ghcr.io/go-vikunja/vikunja:pr-3738
docker run -p 3456:3456 ghcr.io/go-vikunja/vikunja:pr-3738

Last updated for commit de42aac

@kolaente
kolaente merged commit c9ab8c3 into main Sep 4, 2026
45 checks passed
@kolaente
kolaente deleted the fix-empty-avatar-src branch September 4, 2026 21:43
@github-actions github-actions Bot removed the auto-merge PR has GitHub auto-merge enabled label Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/avatars User avatar providers (Gravatar, LDAP, upload) and rendering area/frontend Frontend-only code or UI work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants