willnorris / willnorris/imageproxy

Scale to width and height without cropping

Open
#233 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
4k
Forks
513
PR merge metrics
No merged PRs in 30d

Description

Hi
It would be very useful to be able to scale an image to both a max width and max height without cropping. Basically make it fit inside a box that is e.g. 200x300, but without cropping it.

As far as I can tell this is not possible, or am I missing something? It would be awesome to have in place.

Thanks!

Anders

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the existing image-resizing path in the Go repository and identify how width and height constraints are currently handled. Confirm the expected behavior for a 200x300 box using images with different aspect ratios; done means the full image fits within both limits without cropping.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.