<twig:img> responsive images inspired by <NuxtImg> #3121
Replies: 6 comments 3 replies
-
|
That's would be a great addition, I know @WebMamba already started to work on something, but he's gone to travel the world ⛵ |
Beta Was this translation helpful? Give feedback.
-
|
@Kocal glad to hear that. What would be the next steps? Changing namespaces and creating PR? |
Beta Was this translation helpful? Give feedback.
-
|
Wow I remember giving Matheo some code i made a few years back on that topic... and listed all the features a "UX Image" component should have imho... Well... your bundle does absolutely all of that, it's amazing :) Let's open a PR and work on it! Symfony\UX\Image would be the perfect PSR namespace ! Also we use the "now-recommanded" bundle structure .. probably simpler if you change it before opening the PR ? |
Beta Was this translation helpful? Give feedback.
-
|
Hi @razbakov : still motivated about this? I have to admit this was pretty high on my to-do list for UX and I'd love to work with your proposal here... The alternative is to start from scratch. Well... from the code/samples I showed the team almost a year ago, but it was still taken from an old project I did years ago, even before TwigComponent existed so... We'd start smaller --that can be in the "pros" column-- but we would have to redo a lot of things you already did... and redoing open source work is definitely something I'd put in the "cons" column 😅 I'm open to any suggestion: we can give you guidance/help, or dive deep and help you make this great start into a superb UX Image component. Or anything in between. |
Beta Was this translation helpful? Give feedback.
-
|
@razbakov Your bundle looks really great! I'm sure we can build something interesting with it. |
Beta Was this translation helpful? Give feedback.
-
|
Another example of a similar issue in Sulu we have a https://github.com/sulu/web-twig/blob/2.6/docs/image.md It's task is not about resizing, ... as all formats and its Urls are already defined in Sulu already in the object array. Sure not suitable for static usage so, but some inspiration around this. I would see resizing, convert to web and so on separatly, and would recommend only concentrate how you can create img, picture tags easier in a first step. There may could be keep things in mind to support rendering URLs instead for external services like: There is also a standard about image resizing https://iiif.io/api/image/3.0/. So later a iiif compatible endpoint / controller or server can be used instead. Rokka supports also the iiif standard for image manipulation for example. And I think also https://imgproxy.net/ which is a self hosted solution. Mostly the case why we never used https://github.com/liip/LiipImagineBundle was that it works only good for static images not for dynamic or images which may are on S3 or other external resources. Think the tricky part for such component is to support even External Images / External Image URL providers and not only concentrate on Static Images. Also the thing why we never used https://github.com/liip/LiipImagineBundle as it was only suitable for Static cases. Hope I could give you some views from another perspective on such component. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The Symfony Responsive Image Bundle is designed to address modern performance requirements, particularly Core Web Vitals. Inspired by NuxtImg
Would it be a good idea to add this to Symfony UX?
Beta Was this translation helpful? Give feedback.
All reactions