Professional

Merchant Image Proxy

· Pricesearcher

Mountain image tiles passing through resize brackets into landscape and portrait images.

Problem

Pricesearcher displayed images hosted by merchants with inconsistent URLs and serving behaviour. Product pages needed one endpoint for resizing and caching, but failures at the merchant source also needed sensible presentation choices.

Constraints

The service already used a fork of willnorris/imageproxy. Replacing it would discard existing resizing and caching behaviour. Special characters in merchant URLs could be corrupted by decoding and re-encoding, and staging and production shared Terraform-managed deployment practices.

Solution

The Go proxy ran as a signed company-domain endpoint on AWS Lambda behind API Gateway. I extended the existing fork with configurable image-failure behaviour; Terraform managed separate environments.

My Role

I maintained and customised the Go fork, added original-image and no-image fallback options alongside the existing placeholder, fixed URL decoding/encoding that corrupted special characters, and aligned Terraform with the deployments’ remote state.

Technologies

Go, AWS Lambda, API Gateway, Terraform, Docker.

Engineering Challenges

  • Correctness at the URL boundary: A proxy URL can be syntactically valid yet point to the wrong merchant image after an extra decode/encode cycle. The fix targeted that boundary rather than changing the image pipeline wholesale.
  • Failure is a product decision: Passing through the original, returning no image or showing a placeholder are different tradeoffs; making the fallback configurable let the site choose deliberately.
  • Respecting existing infrastructure: Extending the upstream fork and aligning Terraform state preserved established resizing, caching and environment deployments.

Outcome

The existing proxy gained correct handling for affected special-character URLs and explicit fallback choices. It standardised site image requests, but it could not guarantee availability of merchant-hosted originals.

Relevant services

Have a Python, AI or automation problem?

Tell me what is slowing the business down, what you have tried, and what a successful outcome looks like. I'll help you identify the most sensible next step.