Skip to content

Commit

Permalink
feat(web): set asset as profile picture (immich-app#3106)
Browse files Browse the repository at this point in the history
* add profile-image-cropper component

* add dom-to-image library

* add store to update user profile picture when set

* dom-to-image

* remove console.logs, add svelte binding

* fix format, unused vars

* change caching of profile image

* set hash after profile image change

* remove unnecessary store

* remove unecesarry changes

* set types/dom-to-image as devDependency

* remove unecessary type declarations
use handleError

* remove error notification
which is already handled by handleError

* Revert "set types/dom-to-image as devDependency"

This reverts commit ca8b3ed.

* add types do dev dependencies

* use on:close instead of on:close={()=>...}

* add newline

* sort imports

* bind photo-viewer imgElement directly, not working

* remove console.log, fix binding

* make imgElement optional

* fix element as optional prop

* fix type

* check for transparency

* small changes

* fix img.decode

* add bg, remove publicsharedkey

* fix omit publicSharedKey

---------

Co-authored-by: Alex Tran <[email protected]>
  • Loading branch information
faupau03 and alextran1502 authored Jul 16, 2023
1 parent ed3c239 commit 7595d01
Show file tree
Hide file tree
Showing 7 changed files with 204 additions and 121 deletions.
2 changes: 1 addition & 1 deletion server/src/immich/controllers/user.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ export class UserController {
}

@Get('/profile-image/:userId')
@Header('Cache-Control', 'private, max-age=86400, no-transform')
@Header('Cache-Control', 'private, no-cache, no-transform')
async getProfileImage(@Param() { userId }: UserIdDto, @Response({ passthrough: true }) res: Res): Promise<any> {
const readableStream = await this.service.getUserProfileImage(userId);
res.header('Content-Type', 'image/jpeg');
Expand Down
Loading

0 comments on commit 7595d01

Please sign in to comment.