feat(base/profile): compress avatar uploads with tight 512px cap
Pass tuned compress options to <ImageUpload>: 512px max edge / 200 KB target. Avatars don't need 1920px and the smaller cap meaningfully reduces pict-rs storage for a high-volume content type. Closes #59 for the profile consumer. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c1194dadbb
commit
a815442990
1 changed files with 4 additions and 1 deletions
|
|
@ -30,7 +30,9 @@
|
||||||
<User class="h-10 w-10 text-muted-foreground" />
|
<User class="h-10 w-10 text-muted-foreground" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Upload component -->
|
<!-- Upload component. Avatars are small; tighten the
|
||||||
|
default compress knobs so a 4K phone photo lands as
|
||||||
|
a ~200 KB 512px WebP. -->
|
||||||
<ImageUpload
|
<ImageUpload
|
||||||
v-model="uploadedPicture"
|
v-model="uploadedPicture"
|
||||||
:multiple="false"
|
:multiple="false"
|
||||||
|
|
@ -38,6 +40,7 @@
|
||||||
:max-size-mb="5"
|
:max-size-mb="5"
|
||||||
:disabled="isUpdating"
|
:disabled="isUpdating"
|
||||||
:allow-camera="true"
|
:allow-camera="true"
|
||||||
|
:compress="{ maxWidthOrHeight: 512, maxSizeMB: 0.2 }"
|
||||||
placeholder="Upload picture"
|
placeholder="Upload picture"
|
||||||
accept="image/*"
|
accept="image/*"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue