Skip to content

Provide image component similar to next/image #42765

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
prabh-62 opened this issue Jul 4, 2021 · 10 comments
Closed

Provide image component similar to next/image #42765

prabh-62 opened this issue Jul 4, 2021 · 10 comments
Labels
area: common Issues related to APIs in the @angular/common package feature: under consideration Feature request for which voting has completed and the request is now under consideration feature Issue that requests a new feature
Milestone

Comments

@prabh-62
Copy link

prabh-62 commented Jul 4, 2021

Feature Request

Relevant Package

  • @angular/image

Description

Since version 10.0.0, Next.js has a built-in Image Component and Automatic Image Optimization.

In Angular land, user has to first navigate to squoosh.app and shrink/resize the image before placing it under the assets folder

Describe the solution you'd like

Provide an angular component for image optimization similar to Next.js Image

Describe alternatives you've considered

Manually optimize JPG/PNG/WebP images using squoosh.app and SVG using SVGOMG

@petebacondarwin petebacondarwin added the feature Issue that requests a new feature label Jul 4, 2021
@splincode
Copy link
Contributor

Maybe relate to @angular/cdk/image?

@flash-me
Copy link
Contributor

flash-me commented Jul 5, 2021

Maybe relate to @angular/cdk/image?

Yes or even @angular/cli because the optimization of next/image happens on server side with a node instance that serves the next app. It's not just a react component, there is more behind it.

For additional information: https://nextjs.org/docs/basic-features/image-optimization

cheers
flash ⚡

@alan-agius4
Copy link
Contributor

alan-agius4 commented Jul 5, 2021

There are multiple aspects to this feature, how it works also dependent on which image providers are used. This is because certain image providers (CDN) offer image optimisations out-of-box.

  1. When using one of the supported image providers, queries are added to the request, this is done so that the image is resized and optimised directly the provider.
  2. When the image is remotely stored but the provider is not supported during request time the image is downloaded, optimized, cached and served.
  3. When the image from the local FS, similar to remote images, during request time the image is read, optimised, cached and served.

While the first can be archived using a purely client side component, The latter two would need to be handled during SSR.

@angular-robot
Copy link
Contributor

angular-robot bot commented Jul 5, 2021

This feature request is now candidate for our backlog! In the next phase, the community has 60 days to upvote. If the request receives more than 20 upvotes, we'll move it to our consideration list.

You can find more details about the feature request process in our documentation.

@angular-robot angular-robot bot added the feature: votes required Feature request which is currently still in the voting phase label Jul 5, 2021
@samuelfernandez
Copy link

I'd be happy to help in contributing this after a technical discussion

@atscott atscott added the area: common Issues related to APIs in the @angular/common package label Jul 8, 2021
@ngbot ngbot bot added this to the Backlog milestone Jul 8, 2021
@angular-robot angular-robot bot added feature: under consideration Feature request for which voting has completed and the request is now under consideration and removed feature: votes required Feature request which is currently still in the voting phase labels Jul 14, 2021
@conradkirschner
Copy link

@atscott Are here any updates?

@HamzaMoiyadi
Copy link

This would be a great feature to implement!
Any updates? Would love to contribute as well

@otodockal
Copy link
Contributor

@HamzaMoiyadi @conradkirschner https://angular.io/guide/roadmap#improve-image-performance

@alan-agius4 alan-agius4 changed the title Provide @angular/image component similar to next/image Provide image component similar to next/image Aug 9, 2022
@alan-agius4 alan-agius4 linked a pull request Aug 9, 2022 that will close this issue
3 tasks
@pkozlowski-opensource
Copy link
Member

We do have NgOptimizedImage directive starting from Angular 14.2

@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Feb 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: common Issues related to APIs in the @angular/common package feature: under consideration Feature request for which voting has completed and the request is now under consideration feature Issue that requests a new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.