Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Explain how "Uploaded image is too large!" in avatar upload #2372

Open
4 tasks done
Justinzobel opened this issue Feb 17, 2024 · 4 comments
Open
4 tasks done

Explain how "Uploaded image is too large!" in avatar upload #2372

Justinzobel opened this issue Feb 17, 2024 · 4 comments
Labels
area: media enhancement New feature or request

Comments

@Justinzobel
Copy link

Requirements

  • Is this a feature request? For questions or discussions use https://lemmy.ml/c/lemmy_support
  • Did you check to see if this issue already exists?
  • Is this only a feature request? Do not put multiple feature requests in one issue.
  • Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.

Is your proposal related to a problem?

When uploading an avatar that is too large an error appears Uploaded image is too large! but doesn't tell the user what about their image is too large. Is it the width, height or size on kB?

Describe the solution you'd like.

Explain to the user which aspect of their image is too large in the popup e.g.

Image is above 1MB size limit
Image is too wide, maximum width 500px
Image is too tall, maximum height 500px

Describe alternatives you've considered.

Alternatively specify these limits on the page under the Avatar section in Settings.

Additional context

No response

@Justinzobel Justinzobel added the enhancement New feature or request label Feb 17, 2024
@Nutomic
Copy link
Member

Nutomic commented Feb 19, 2024

That error message comes from pictrs error too_large. It looks like pictrs has various configurable limits for image size, like max width, height, area, filesize etc. Best ask your admin what exactly is configured.

cc @asonix Can pictrs return more specific errors in this case?

@asonix
Copy link

asonix commented Feb 19, 2024

pict-rs is more specific for errors like this, and I'm actually having trouble figuring out where the too_large error is coming from. pict-rs is capable of differentiating between file size errors, width errors, height errors, and area errors and should respond appropriately. 0.5 even adds error codes to make matching on these errors easier

@Nutomic
Copy link
Member

Nutomic commented Feb 21, 2024

The only place I found this string is in the lemmy-ui code, and its expecting pictrs to respond with such a message.

@dessalines
Copy link
Member

This is most likely a lemmy-UI issue then. I'll transfer it.

@dessalines dessalines transferred this issue from LemmyNet/lemmy Feb 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: media enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants