Skip to content
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

NgOptimizedImage retrieving width not listed on breakpoints #55853

Closed
rafagsiqueira opened this issue May 17, 2024 · 1 comment
Closed

NgOptimizedImage retrieving width not listed on breakpoints #55853

rafagsiqueira opened this issue May 17, 2024 · 1 comment

Comments

@rafagsiqueira
Copy link

rafagsiqueira commented May 17, 2024

Which @angular/* package(s) are the source of the bug?

common

Is this a regression?

No

Description

Setting the breakpoints and a custom loader:

const imageBreakpoints = [32, 48, 64, 96, 128, 256, 384, 640, 750, 828, 1080, 1200, 1920, 2048];
(...)
{ provide: IMAGE_CONFIG, useValue: { breakpoints: imageBreakpoints, placeholderResolution: 32 }},
{ provide: IMAGE_LOADER, useValue: (config: ImageLoaderConfig) => {
      const [name, extension] = config.src.split('.');
      return `${environment.public}/images/${name}/${config.width}.${extension}`;
}},

I am getting the following 404 errors:
https://<redacted>/images/registration_and_publication/1510.jpg 404 (The specified blob does not exist.)

Please provide a link to a minimal reproduction of the bug

No response

Please provide the exception or error you saw

I am getting the following 404 errors:
`https://<redacted>/images/registration_and_publication/1510.jpg 404 (The specified blob does not exist.)`

Please provide the environment you discovered this bug in (run ng version)

Angular CLI: 17.3.5
Node: 20.13.1
Package Manager: yarn 4.1.1
OS: darwin arm64

Angular: 17.3.5
... animations, cdk, cli, common, compiler, compiler-cli, core
... forms, localize, material, platform-browser
... platform-browser-dynamic, pwa, router

Package                         Version
---------------------------------------------------------
@angular-devkit/architect       0.1703.5
@angular-devkit/build-angular   17.3.5
@angular-devkit/core            17.3.5
@angular-devkit/schematics      17.3.5
@schematics/angular             17.3.5
ng-packagr                      17.3.0
rxjs                            7.8.1
typescript                      5.2.2
zone.js                         0.14.4

Anything else?

No response

@rafagsiqueira
Copy link
Author

My mistake, I need to set the sizes property.

@rafagsiqueira rafagsiqueira closed this as not planned Won't fix, can't repro, duplicate, stale May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant