{"id":25815555,"url":"https://github.com/samjuk/m2-module-fetch-priority","last_synced_at":"2026-02-27T01:32:17.404Z","repository":{"id":279410423,"uuid":"938057263","full_name":"SamJUK/m2-module-fetch-priority","owner":"SamJUK","description":"[WIP]","archived":false,"fork":false,"pushed_at":"2026-01-12T12:10:26.000Z","size":42,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-12T19:12:11.630Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SamJUK.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-24T10:58:25.000Z","updated_at":"2026-01-12T12:07:54.000Z","dependencies_parsed_at":null,"dependency_job_id":"d02dde17-3c82-4dea-95d8-ddc4afb9a46f","html_url":"https://github.com/SamJUK/m2-module-fetch-priority","commit_stats":null,"previous_names":["samjuk/m2-module-fetch-priority"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/SamJUK/m2-module-fetch-priority","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamJUK%2Fm2-module-fetch-priority","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamJUK%2Fm2-module-fetch-priority/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamJUK%2Fm2-module-fetch-priority/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamJUK%2Fm2-module-fetch-priority/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SamJUK","download_url":"https://codeload.github.com/SamJUK/m2-module-fetch-priority/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SamJUK%2Fm2-module-fetch-priority/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29880749,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T23:51:21.483Z","status":"ssl_error","status_checked_at":"2026-02-26T23:50:46.793Z","response_time":89,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-28T04:28:46.112Z","updated_at":"2026-02-27T01:32:17.397Z","avatar_url":"https://github.com/SamJUK.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SamJUK_FetchPriority\n\n[![Supported Magento Versions](https://img.shields.io/badge/magento-2.4.6%E2%80%932.4.8-orange.svg?logo=magento)](https://github.com/SamJUK/m2-module-fetch-priority/actions/workflows/ci.yml)\n[![CI Workflow Status](https://github.com/samjuk/m2-module-fetch-priority/actions/workflows/ci.yml/badge.svg)](https://github.com/SamJUK/m2-module-fetch-priority/actions/workflows/ci.yml)\n[![GitHub Release](https://img.shields.io/github/v/release/SamJUK/m2-module-fetch-priority?label=Latest%20Release\u0026logo=github)](https://github.com/SamJUK/m2-module-fetch-priority/releases)\n\nThis module adds options to set the fetch priority \u0026 lazy loading attribute on images added via the admin area.\n\nIt also provides a simple API to add preload \u0026 prefetch link tags to the header from other modules.\n\n## Installation\n```sh\ncomposer require samjuk/m2-module-fetch-priority\nphp bin/magento setup:upgrade \u0026\u0026 php bin/magento cache:flush\n```\n\n## Link Tag Usage\n\nTo use this module to add preload/prefetch link tags\n\n### Example Preload Usage\n```php\nclass MyClassToAddPreloads\n{\n     public function __construct(\n          private readonly \\SamJUK\\FetchPriority\\Model\\LinkStore $linkStore,\n          private readonly \\SamJUK\\FetchPriority\\Model\\Links\\PreloadFactory $preloadFactory\n     ) { }\n\n     public function execute()\n     {\n          // Do Stuff\n          $preload = $this-\u003epreloadFactory-\u003ecreate([\n               'href' =\u003e 'https://app.magento2.test/media/my_custom_entity/image1.jpg',\n               'mimeType' =\u003e \\SamJUK\\FetchPriority\\Enum\\Preload\\MimeType::ImageJPEG,\n               'asType' =\u003e \\SamJUK\\FetchPriority\\Enum\\Preload\\AsType::Image,\n               'fetchPriority' =\u003e \\SamJUK\\FetchPriority\\Enum\\FetchPriority::High\n          ]);\n          $this-\u003elinkStore-\u003eadd($preload);\n     }\n}\n```\n\n\n### Example Prefetch Usage\n```php\nclass MyClassToAddPrefetches\n{\n     public function __construct(\n          private readonly \\SamJUK\\FetchPriority\\Model\\LinkStore $linkStore,\n          private readonly \\SamJUK\\FetchPriority\\Model\\Links\\PrefetchFactory $preloadFactory\n     ) { }\n\n     public function execute()\n     {\n          // Do Stuff\n          $prefetch = $this-\u003epreloadFactory-\u003ecreate([\n               'href' =\u003e 'https://app.magento2.test/media/my_custom_entity/image1.jpg',\n          ]);\n          $this-\u003elinkStore-\u003eadd($prefetch);\n     }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamjuk%2Fm2-module-fetch-priority","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamjuk%2Fm2-module-fetch-priority","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamjuk%2Fm2-module-fetch-priority/lists"}