[MGNLIMG-169] Provide image resizing possibility without a theme Created: 12/Aug/15 Updated: 03/Sep/20 |
|
| Status: | Open |
| Project: | Imaging |
| Component/s: | tools |
| Affects Version/s: | 3.2 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major |
| Reporter: | Christian Ringele | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 4 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||
| Date of First Response: | |||||||||
| Description |
|
Currently the only way to get resized images is via imaging rules defined in a theme: This means that the template needs a site and a theme in use. So for pure "freemarker" templating, there is currently no way of requesting different image sizes. It should provide something very simple, as any other CMS does:
${imgresizefn.resize(Asset asset, String width, String height)}
${imgresizefn.resize(Asset asset, String width)}
${imgresizefn.resize(Node binaryNode, String width, String height)}
${imgresizefn.resize(Node binaryNode, String width)}
|
| Comments |
| Comment by Tomáš Gregovský [ 09/Feb/16 ] |
|
I like and support this idea - easier then using image variations (complicated to explain, need to configure on multiple locations, not all of them via yaml). Instead of new function it can be add to already existing imgfn, and if there will be also option to crop:true/false then it will be nice front-end improvement. Thanks! |
| Comment by Christopher Zimmermann [ 02/Sep/20 ] |
|
This is also an issue for headless usecases. |
| Comment by Richard Gange [ 03/Sep/20 ] |
|
If we did implement this feature we should also look into a way to avoid It would be convenient if I could create an asset rendition by simply passing in a number and not have to declare that number in a file. If I pass the variation name "240" then I get a square 240 back. |