{"id":37265772,"url":"https://github.com/rapidez/image-resizer","last_synced_at":"2026-03-13T11:03:02.309Z","repository":{"id":38085427,"uuid":"310541336","full_name":"rapidez/image-resizer","owner":"rapidez","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-06T10:02:44.000Z","size":89,"stargazers_count":0,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-01-14T15:48:57.850Z","etag":null,"topics":["hacktoberfest"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rapidez.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2020-11-06T08:46:54.000Z","updated_at":"2026-01-06T10:02:23.000Z","dependencies_parsed_at":"2026-01-07T07:01:24.932Z","dependency_job_id":null,"html_url":"https://github.com/rapidez/image-resizer","commit_stats":{"total_commits":55,"total_committers":10,"mean_commits":5.5,"dds":0.6727272727272727,"last_synced_commit":"b4c14ec7403c6a0f632ba06ba6e70da706b4e8ff"},"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"purl":"pkg:github/rapidez/image-resizer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapidez%2Fimage-resizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapidez%2Fimage-resizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapidez%2Fimage-resizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapidez%2Fimage-resizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rapidez","download_url":"https://codeload.github.com/rapidez/image-resizer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rapidez%2Fimage-resizer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28474471,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T00:03:33.697Z","status":"ssl_error","status_checked_at":"2026-01-15T23:58:36.859Z","response_time":62,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["hacktoberfest"],"created_at":"2026-01-16T00:14:01.424Z","updated_at":"2026-01-16T00:14:04.290Z","avatar_url":"https://github.com/rapidez.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rapidez Image Resizer\n\nInstead of just loading the full and big images from Magento this extension resizes the images. This works by passing the Magento image path through the image route: `/storage/{store id}/resizes/{size}/magento/{file}`.\n\nLet's say a product image is located at: `https://magentowebsite.com/media/catalog/product/a/a/product-image.jpg` the path will be `/catalog/product/a/a/product-image.jpg`. To get this image with a maximum width of 200 pixels you go to: `/storage/1/resizes/200/magento/catalog/product/a/a/product-image.jpg`. If you also want to specify a maximum height: `/storage/1/resizes/200x200/magento/catalog/product/a/a/product-image.jpg`.\n\nAutomatic webp conversion will also be done if the url has `.webp` as it's extension e.g. `/storage/1/resizes/200x200/magento/catalog/product/a/a/product-image.jpg.webp`\nThis will make it retrieve the image from `https://magentowebsite.com/media/catalog/product/a/a/product-image.jpg`, resize it, format it as webp and save it as `/storage/1/resizes/200x200/magento/catalog/product/a/a/product-image.jpg.webp`.\n\n## Installation\n\nThis package is installed by default in Rapidez. But if removed you can re-install it with:\n```sh\ncomposer require rapidez/image-resizer\n```\nAnd make sure you ran `php artisan storage:link`\n\n## Image from SKU\n\nYou can retrieve a product image by using the product's SKU. This is enabled by default, but can be toggled with the `sku.enabled` value in the config file.\n\nTo retrieve a product image using SKU, request a path like this: `/storage/1/resizes/200x200/sku/13706`. You can also request a webp like this: `/storage/1/resizes/200x200/sku/13706.webp`.\n\n## Config\n\nKeep in mind that you have to whitelist all sizes to avoid ddos attacks! Publish the config and specify the sizes you want:\n\n```sh\nphp artisan vendor:publish --provider=\"Rapidez\\ImageResizer\\ImageResizerServiceProvider\" --tag=config\n```\n\n### External sources\n\nIf you are using images from other external location (see the [CMS integrations](https://docs.rapidez.io/0.x/packages.html#cms)) you can add that source:\n\n```\n'external' =\u003e [\n     'strapi' =\u003e env('STRAPI_URL'),\n],\n```\n\nNow you can use the following path to resize the images from the external source:\n\n```html\n\u003cimg src=\"{{ '/storage/' . config('rapidez.store') . '/resizes/\u003csize\u003e/strapi'.$data-\u003eimage-\u003eurl }}\" /\u003e\n```\n\nOr alternatively using Laravels route function\n\n```html\n\u003cimg src=\"{{ route('resized-image', [\n    'store' =\u003e config('rapidez.store'), \n    'size' =\u003e '\u003csize\u003e', \n    'placeholder' =\u003e 'strapi', \n    'file' =\u003e $data-\u003eimage-\u003eurl\n]) }}\" /\u003e\n```\n\n## How it works\n\nImages are downloaded from the media url and stored in `/storage/app/public/\u003cstore\u003e/resizes`. Because of the symlink created with `php artisan storage:link` the files are then publicly available. Because the route is the same as the path, the webserver first tries to serve the file if it exists, otherwise it will go through PHP to resize and create it.\n\n## Deleting resizes\n\nThe image resizes can be deleted using this artisan command:\n```sh\nphp artisan rapidez:resizes:delete {store?}\n```\n\n## License\n\nGNU General Public License v3. Please see [License File](LICENSE) for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapidez%2Fimage-resizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frapidez%2Fimage-resizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frapidez%2Fimage-resizer/lists"}