MCPcopy
hub / github.com/angular/angular / logLazyLCPWarning

Function logLazyLCPWarning

packages/core/src/image_performance_warning.ts:207–220  ·  view source on GitHub ↗
(src: string)

Source from the content-addressed store, hash-verified

205}
206
207function logLazyLCPWarning(src: string) {
208 console.warn(
209 formatRuntimeError(
210 RuntimeErrorCode.IMAGE_PERFORMANCE_WARNING,
211 `An image with src ${src} is the Largest Contentful Paint (LCP) element ` +
212 `but was given a "loading" value of "lazy", which can negatively impact ` +
213 `application loading performance. This warning can be addressed by ` +
214 `changing the loading value of the LCP image to "eager", or by using the ` +
215 `NgOptimizedImage directive's prioritization utilities. For more ` +
216 `information about addressing or disabling this warning, see ` +
217 `${ERROR_DETAILS_PAGE_BASE_URL}/NG0913`,
218 ),
219 );
220}
221
222function logOversizedImageWarning(src: string) {
223 console.warn(

Callers 1

scanImagesMethod · 0.85

Calls 2

formatRuntimeErrorFunction · 0.90
warnMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…