wintercms / wintercms/winter

imageWidth/imageHeight filters not available on cold cache

Open
#1,120 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

help wanted needs response
Dominant language
PHP
Stars
1.5k
Forks
246
Avg merge
19h 2m
Merged PRs (30d)
7

Description

Package targeted

Winter CMS

Description

Twig filters | imageWidth and | imageHeight are not working until the resized image is generated (on cold cache) as they fail to manage /resizer/* url resource.

When the filter are applied to a /resizer/* resource, ImageResizer::filterGetDimensions() should calculate and return valid values (using the stored configuration?).

Will this change be backwards-compatible?

No breaking changes expected.

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 at ImageResizer::filterGetDimensions() and trace how /resizer/* URLs are handled before the resized image exists. Check the stored configuration used for the resource and verify that imageWidth and imageHeight return valid dimensions on a cold cache as well as an existing cache.

Written by the indexing model from the issue text.

Assessment

Tech stack
laravel, php
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.