Skip to content

Limit logo and vehicle images to 400px - #4100

Open
Daniiiil1 wants to merge 1 commit into
bluerobotics:masterfrom
Daniiiil1:codex/limit-vehicle-images
Open

Limit logo and vehicle images to 400px#4100
Daniiiil1 wants to merge 1 commit into
bluerobotics:masterfrom
Daniiiil1:codex/limit-vehicle-images

Conversation

@Daniiiil1

Copy link
Copy Markdown

Summary

  • add an optional maximum image dimension to the shared image picker
  • resize JPEG, PNG, and WebP uploads in the browser while preserving aspect ratio
  • apply a 400 px limit to vehicle and logo images without enlarging smaller files

This prevents oversized custom branding images from being stored and rendered by BlueOS.

Closes #3987

Validation

  • corepack yarn --cwd core/frontend lint
  • corepack yarn --cwd core/frontend build

@Daniiiil1
Daniiiil1 marked this pull request as ready for review August 7, 2026 12:30
})
this.loadImages()
},
async resizeImage(file: File): Promise<Blob> {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we probably should use browser-image-compression over doing all this.

@rafaellehmkuhl

Copy link
Copy Markdown
Member

I would suggest investigating if 400px is the correct number, taking 4K screens into consideration. The way that I see, the main problem is not the resolution/dimensions, but the image size, aspect ratio, and the way it's being rendered.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Limit logo and vehicle image to max 400px size

3 participants