{"id":337625,"date":"2022-08-28T09:00:08","date_gmt":"2022-08-28T09:00:08","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=337625"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=337625","title":{"rendered":"<span>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u044b NgOptimizedImage \u0434\u043b\u044f \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0432 Angular<\/span>"},"content":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/c1e\/166\/dfa\/c1e166dfafadeb414b08689a2e8c2533.png\" width=\"820\" height=\"504\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/c1e\/166\/dfa\/c1e166dfafadeb414b08689a2e8c2533.png\"\/><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 <code>NgOptimizedImage<\/code> \u0432 Angular \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044f \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u041e\u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0432 Angular v14.2.0. \u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u0430 \u043a\u0430\u043a <code>standalone<\/code> \u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0432 <code>standalone<\/code> \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438 \u043c\u043e\u0434\u0443\u043b\u0438.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>src<\/code> \u0412\u0430\u0448\u0435\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043d\u0430 <code>rawSrc<\/code>:<\/p>\n<pre><code class=\"typescript\">import { NgOptimizedImage } from '@angular\/common';  @Component({   standalone: true,   imports: [NgOptimizedImage],   template: `     &lt;!-- \u0432\u0438\u0434\u0438\u043c\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b -->     &lt;img rawSrc=\"https:\/\/picsum.photos\/200\/300\" width=\"200\" height=\"300\" priority \/>          &lt;!-- \u043d\u0438\u0436\u0435 \u0432\u0438\u0434\u0438\u043c\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b -->     &lt;img rawSrc=\"https:\/\/picsum.photos\/300\/300\"          style=\"margin-top: 300vh\"          width=\"300\"          height=\"300\" \/>`, }) export class LoginPageComponent {}<\/code><\/pre>\n<p>\u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u043d\u0430\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 <a href=\"https:\/\/web.dev\/i18n\/ru\/lcp\/\" rel=\"noopener noreferrer nofollow\">LCP(\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430)<\/a>:<\/p>\n<ul>\n<li>\n<p><u>\u0410\u0442\u0440\u0438\u0431\u0443\u0442<\/u> <code>loading<\/code> \u0434\u043b\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0438\u0436\u0435 \u0432\u0438\u0434\u0438\u043c\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043d\u0430 <code>lazy<\/code>, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>loading<\/code> \u0434\u043b\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0432 \u0432\u0438\u0434\u0438\u043c\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0431\u0443\u0434\u0435\u0442 <code>eager<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u041e\u043d\u0430 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0432 \u0432\u0438\u0434\u0438\u043c\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>high<\/code> \u0434\u043b\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 <code>fetchpriority<\/code>. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u2014 <code>default<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u041e\u043d\u0430 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u0432\u0438\u0434\u0438\u043c\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0431\u0443\u0434\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0442\u0435\u0433 <code>preconnect<\/code>.<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"xml\">&lt;!doctype html> &lt;html lang=\"en\">  &lt;head>   &lt;meta charset=\"utf-8\">   &lt;title>MyNgApp&lt;\/title>   &lt;base href=\"\/\">   &lt;!-- ?? ?? ?? ?? ?? ?? -->   &lt;link rel=\"preconnect\" href=\"https:\/\/picsum.photos\">   &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">   &lt;link rel=\"icon\" type=\"image\/x-icon\" href=\"favicon.ico\"> &lt;\/head>  &lt;body>   &lt;app-root>&lt;\/app-root> &lt;\/body>  &lt;\/html><\/code><\/pre>\n<ul>\n<li>\n<p>\u041e\u043d\u0430 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u0448\u0438\u0440\u0438\u043d\u0430 \u0438 \u0432\u044b\u0441\u043e\u0442\u0430 \u0431\u0443\u0434\u0443\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u043b\u0438\u0441\u044c <a href=\"https:\/\/web.dev\/i18n\/ru\/css-web-vitals\/#izobrazheniya-i-sdvigi-maketa\" rel=\"noopener noreferrer nofollow\">\u0441\u0434\u0432\u0438\u0433\u0438 \u043c\u0430\u043a\u0435\u0442\u0430<\/a>.<\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u043b\u043e\u0432\u043e \u00ab\u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u00bb \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 <strong>\u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u0442<\/strong> \u00a0\u0412\u0430\u0441, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a.<\/p>\n<h2>\u0417\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439<\/h2>\n<p>\u0417\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u2014 \u044d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 URL-\u0430\u0434\u0440\u0435\u0441 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u0417\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>src<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0434\u043b\u044f <code>rawSrc<\/code>. \u0422\u0430\u043a\u0436\u0435 Angular \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0438 \u0434\u043b\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439:<\/p>\n<ul>\n<li>\n<p>Cloudflare Image Resizing<\/p>\n<\/li>\n<li>\n<p>\u0421loudinary<\/p>\n<\/li>\n<li>\n<p>ImageKit<\/p>\n<\/li>\n<li>\n<p>Imgix<\/p>\n<\/li>\n<\/ul>\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0444\u0430\u0431\u0440\u0438\u043a\u0443 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u043e\u0432 \u0434\u043b\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u043e\u0432:<\/p>\n<pre><code class=\"typescript\">import { NgOptimizedImage, provideImgixLoader } from '@angular\/common';  NgModule({   providers: [     provideImgixLoader(\"https:\/\/my.base.url\/\", {       ensurePreconnect: boolean     })   ],   bootstrap: [AppComponent] }) export class AppModule { }<\/code><\/pre>\n<p>\u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a, \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0432 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440 <code>IMAGE_LOADER<\/code>:<\/p>\n<pre><code class=\"typescript\">import { ImageLoaderConfig, IMAGE_LOADER, NgOptimizedImage } from '@angular\/common';  @NgModule({   providers: [{      provide: IMAGE_LOADER,      useValue: (config: ImageLoaderConfig) => {        return `https:\/\/example.com\/images?src=${config.src}&amp;width=${config.width}` }      }   ],   bootstrap: [AppComponent] }) export class AppModule { } <\/code><\/pre>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u0440\u043e API:<\/p>\n<div class=\"embed_link\">\n<div class=\"embed__thumb\" style=\"background-image: url(&quot;undefined&quot;);\"><\/div>\n<div class=\"embed__caption\">\n<div class=\"embed__caption-title\"><span>Angular<\/span><\/div>\n<p><a href=\"https:\/\/next.angular.io\/api\/common\/NgOptimizedImage\" target=\"_blank\" rel=\"noopener noreferrer nofollow\" class=\"embed__caption-link\">next.angular.io<\/a><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/685018\/\"> https:\/\/habr.com\/ru\/post\/685018\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><figcaption><\/figcaption><\/figure>\n<p>\u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 <code>NgOptimizedImage<\/code> \u0432 Angular \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044e \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439, \u0441\u043e\u0445\u0440\u0430\u043d\u044f\u044f \u0432\u044b\u0441\u043e\u043a\u0443\u044e \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c. \u041e\u043d\u0430 \u0434\u043e\u0441\u0442\u0443\u043f\u043d\u0430 \u0432 Angular v14.2.0. \u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 \u043f\u043e\u043c\u0435\u0447\u0435\u043d\u0430 \u043a\u0430\u043a <code>standalone<\/code> \u0438 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u0432 <code>standalone<\/code> \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u0438 \u043c\u043e\u0434\u0443\u043b\u0438.<\/p>\n<p>\u0427\u0442\u043e\u0431\u044b \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0437\u0430\u043c\u0435\u043d\u0438\u0442\u044c \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>src<\/code> \u0412\u0430\u0448\u0435\u0433\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u043d\u0430 <code>rawSrc<\/code>:<\/p>\n<pre><code class=\"typescript\">import { NgOptimizedImage } from '@angular\/common';  @Component({   standalone: true,   imports: [NgOptimizedImage],   template: `     &lt;!-- \u0432\u0438\u0434\u0438\u043c\u0430\u044f \u043e\u0431\u043b\u0430\u0441\u0442\u044c \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b -->     &lt;img rawSrc=\"https:\/\/picsum.photos\/200\/300\" width=\"200\" height=\"300\" priority \/>          &lt;!-- \u043d\u0438\u0436\u0435 \u0432\u0438\u0434\u0438\u043c\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b -->     &lt;img rawSrc=\"https:\/\/picsum.photos\/300\/300\"          style=\"margin-top: 300vh\"          width=\"300\"          height=\"300\" \/>`, }) export class LoginPageComponent {}<\/code><\/pre>\n<p>\u0414\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442 \u043d\u0430\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u043f\u0440\u0435\u0438\u043c\u0443\u0449\u0435\u0441\u0442\u0432\u0430 <a href=\"https:\/\/web.dev\/i18n\/ru\/lcp\/\" rel=\"noopener noreferrer nofollow\">LCP(\u0421\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0433\u043e \u043a\u043e\u043d\u0442\u0435\u043d\u0442\u0430)<\/a>:<\/p>\n<ul>\n<li>\n<p><u>\u0410\u0442\u0440\u0438\u0431\u0443\u0442<\/u> <code>loading<\/code> \u0434\u043b\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u043d\u0438\u0436\u0435 \u0432\u0438\u0434\u0438\u043c\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d \u043d\u0430 <code>lazy<\/code>, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0430\u0442\u0440\u0438\u0431\u0443\u0442 <code>loading<\/code> \u0434\u043b\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0432 \u0432\u0438\u0434\u0438\u043c\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0431\u0443\u0434\u0435\u0442 <code>eager<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u041e\u043d\u0430 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u043f\u0440\u0438\u043e\u0440\u0438\u0442\u0435\u0442\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439 \u0432 \u0432\u0438\u0434\u0438\u043c\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b. \u042d\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442, \u0447\u0442\u043e \u0431\u0443\u0434\u0435\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <code>high<\/code> \u0434\u043b\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 <code>fetchpriority<\/code>. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u2014 <code>default<\/code>.<\/p>\n<\/li>\n<li>\n<p>\u041e\u043d\u0430 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0432 \u0432\u0438\u0434\u0438\u043c\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0431\u0443\u0434\u0443\u0442 \u0438\u043c\u0435\u0442\u044c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 \u0442\u0435\u0433 <code>preconnect<\/code>.<\/p>\n<\/li>\n<\/ul>\n<pre><code class=\"xml\">&lt;!doctype html> &lt;html lang=\"en\">  &lt;head>   &lt;meta charset=\"utf-8\">   &lt;title>MyNgApp&lt;\/title>   &lt;base href=\"\/\">   &lt;!-- ?? ?? ?? ?? ?? ?? -->   &lt;link rel=\"preconnect\" href=\"https:\/\/picsum.photos\">   &lt;meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">   &lt;link rel=\"icon\" type=\"image\/x-icon\" href=\"favicon.ico\"> &lt;\/head>  &lt;body>   &lt;app-root>&lt;\/app-root> &lt;\/body>  &lt;\/html><\/code><\/pre>\n<ul>\n<li>\n<p>\u041e\u043d\u0430 \u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442, \u0447\u0442\u043e \u0448\u0438\u0440\u0438\u043d\u0430 \u0438 \u0432\u044b\u0441\u043e\u0442\u0430 \u0431\u0443\u0434\u0443\u0442 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u044b \u0442\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0435\u0434\u043e\u0442\u0432\u0440\u0430\u0449\u0430\u043b\u0438\u0441\u044c <a href=\"https:\/\/web.dev\/i18n\/ru\/css-web-vitals\/#izobrazheniya-i-sdvigi-maketa\" rel=\"noopener noreferrer nofollow\">\u0441\u0434\u0432\u0438\u0433\u0438 \u043c\u0430\u043a\u0435\u0442\u0430<\/a>.<\/p>\n<\/li>\n<\/ul>\n<p>\u0421\u043b\u043e\u0432\u043e \u00ab\u0433\u0430\u0440\u0430\u043d\u0442\u0438\u0440\u0443\u0435\u0442\u00bb \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442, \u0447\u0442\u043e \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0430 <strong>\u043f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0434\u0438\u0442<\/strong> \u00a0\u0412\u0430\u0441, \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u043d\u0435 \u0442\u0430\u043a.<\/p>\n<h2>\u0417\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0438 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439<\/h2>\n<p>\u0417\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u2014 \u044d\u0442\u043e \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u0442 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0439 URL-\u0430\u0434\u0440\u0435\u0441 \u0440\u0435\u0441\u0443\u0440\u0441\u0430 \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f. \u0417\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 <code>src<\/code>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u043c \u0434\u043b\u044f <code>rawSrc<\/code>. \u0422\u0430\u043a\u0436\u0435 Angular \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a\u0438 \u0434\u043b\u044f \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u0445 \u0441\u0435\u0440\u0432\u0438\u0441\u043e\u0432 \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0439:<\/p>\n<ul>\n<li>\n<p>Cloudflare Image Resizing<\/p>\n<\/li>\n<li>\n<p>\u0421loudinary<\/p>\n<\/li>\n<li>\n<p>ImageKit<\/p>\n<\/li>\n<li>\n<p>Imgix<\/p>\n<\/li>\n<\/ul>\n<p>\u0427\u0442\u043e\u0431\u044b \u0438\u0445 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c, \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0444\u0430\u0431\u0440\u0438\u043a\u0443 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u043e\u0432 \u0434\u043b\u044f \u0432\u044b\u0431\u0440\u0430\u043d\u043d\u043e\u0433\u043e \u0441\u0435\u0440\u0432\u0438\u0441\u0430 \u0432 \u043c\u0430\u0441\u0441\u0438\u0432 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440\u043e\u0432:<\/p>\n<pre><code class=\"typescript\">import { NgOptimizedImage, provideImgixLoader } from '@angular\/common';  NgModule({   providers: [     provideImgixLoader(\"https:\/\/my.base.url\/\", {       ensurePreconnect: boolean     })   ],   bootstrap: [AppComponent] }) export class AppModule { }<\/code><\/pre>\n<p>\u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a, \u043f\u0435\u0440\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0432 \u043f\u0440\u043e\u0432\u0430\u0439\u0434\u0435\u0440 <code>IMAGE_LOADER<\/code>:<\/p>\n<pre><code class=\"typescript\">import { ImageLoaderConfig, IMAGE_LOADER, NgOptimizedImage } from '@angular\/common';  @NgModule({   providers: [{      provide: IMAGE_LOADER,      useValue: (config: ImageLoaderConfig) => {        return `https:\/\/example.com\/images?src=${config.src}&amp;width=${config.width}` }      }   ],   bootstrap: [AppComponent] }) export class AppModule { } <\/code><\/pre>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u043f\u0440\u043e API:<\/p>\n<div class=\"embed_link\">\n<div class=\"embed__thumb\" style=\"background-image: url(&quot;undefined&quot;);\"><\/div>\n<div class=\"embed__caption\">\n<div class=\"embed__caption-title\"><span>Angular<\/span><\/div>\n<p><a href=\"https:\/\/next.angular.io\/api\/common\/NgOptimizedImage\" target=\"_blank\" rel=\"noopener noreferrer nofollow\" class=\"embed__caption-link\">next.angular.io<\/a><\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div class=\"v-portal\" style=\"display:none;\"><\/div>\n<\/div>\n<p> <!----> <!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/685018\/\"> https:\/\/habr.com\/ru\/post\/685018\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-337625","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/337625","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=337625"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/337625\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=337625"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=337625"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=337625"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}