{"id":15018944,"url":"https://github.com/pixel-open/prestashop-image-optimizer","last_synced_at":"2025-10-24T00:31:26.189Z","repository":{"id":194997490,"uuid":"692032989","full_name":"Pixel-Open/prestashop-image-optimizer","owner":"Pixel-Open","description":"Image optimizer module is an easy way to resize and compress images on the fly.","archived":false,"fork":false,"pushed_at":"2023-10-20T13:37:20.000Z","size":25,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-10-10T00:41:00.602Z","etag":null,"topics":["image","prestashop","prestashop-module","quality","seo","webperf"],"latest_commit_sha":null,"homepage":"https://pixel-open.org/projects/responsive-optimized-images-on-prestashop","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/Pixel-Open.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2023-09-15T12:17:54.000Z","updated_at":"2024-10-06T13:14:43.000Z","dependencies_parsed_at":"2023-09-16T05:00:58.376Z","dependency_job_id":"d34f8870-fa51-428d-bc12-3c6a7d6c9f90","html_url":"https://github.com/Pixel-Open/prestashop-image-optimizer","commit_stats":{"total_commits":4,"total_committers":1,"mean_commits":4.0,"dds":0.0,"last_synced_commit":"1e1118187067eaf7fd73e2c2edb6516327342582"},"previous_names":["pixel-open/prestashop-image-optimizer"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pixel-Open%2Fprestashop-image-optimizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pixel-Open%2Fprestashop-image-optimizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pixel-Open%2Fprestashop-image-optimizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pixel-Open%2Fprestashop-image-optimizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pixel-Open","download_url":"https://codeload.github.com/Pixel-Open/prestashop-image-optimizer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219867315,"owners_count":16555821,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["image","prestashop","prestashop-module","quality","seo","webperf"],"created_at":"2024-09-24T19:52:39.021Z","updated_at":"2025-10-24T00:31:26.180Z","avatar_url":"https://github.com/Pixel-Open.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Prestashop Image Optimizer\n\n[![Minimum PHP Version](https://img.shields.io/badge/php-%3E%3D%207.2-green)](https://php.net/)\n[![Minimum Prestashop Version](https://img.shields.io/badge/prestashop-%3E%3D%201.7.6.0-green)](https://www.prestashop.com)\n[![GitHub release](https://img.shields.io/github/v/release/Pixel-Open/prestashop-image-optimizer)](https://github.com/Pixel-Open/prestashop-image-optimizer/releases)\n\n## Presentation\n\nImage optimizer module is an easy way to resize and compress images on the fly. Use responsive images with size alternatives.\n\n## Requirements\n\n- Prestashop \u003e= 1.7.6.0\n- PHP \u003e= 7.2.0\n\n## Installation\n\nDownload the **pixel_image_optimizer.zip** file from the [last release](https://github.com/Pixel-Open/prestashop-image-optimizer/releases/latest) assets.\n\n### Admin\n\nGo to the admin module catalog section and click **Upload a module**. Select the downloaded zip file.\n\n### Manually\n\nMove the downloaded file in the Prestashop **modules** directory and unzip the archive. Go to the admin module catalog section and search for \"Image Optimizer\".\n\n## Widget\n\n```html\n{widget name='pixel_image_optimizer'}\n```\n\n### Options\n\n#### The image to optimize\n\n- **id_image**: the prestashop image id (ex: 1)\n\n```smarty\n{widget name='pixel_image_optimizer' id_image=1}\n```\n\n- **image_path**: the image path (ex: img/cms/image.jpg)\n\n```smarty\n{widget name='pixel_image_optimizer' image_path='img/cms/image.jpg'}\n```\n\n#### Optimizer options\n\n- **alt**: alternative text (optional)\n- **class**: img element class name (optional)\n- **image_name**: image name (optional, keep the same image name if empty)\n- **quality**: image quality from 0 to 100 (optional, used only for jpg and webp)\n- **width**: maximum width (optional)\n- **height**: maximum height (optional)\n- **ext**: convert image to jpg, png, gif or webp (optional)\n- **breakpoints**: Alternative widths of responsive images in px (e.g. \"500,800,1200\") (optional)\n- **template**: custom template file\n\n### Examples\n\n#### Product image\n\n```smarty\n{foreach $product.images as $image}\n    {widget name='pixel_image_optimizer'\n        id_image=$image.id_image\n        image_name=$product.name\n        alt=$image.legend\n        class=\"product-image\"\n        quality=80\n        width=750\n    }\n{/foreach}\n```\n\nResult:\n\n```html\n\u003cimg src=\"https://www.example.com/img/web/my-product-name-750x562-80.jpg\"\n     alt=\"Legend\"\n     class=\"product-image\"\n     width=\"750\"\n     height=\"562\"\n     loading=\"lazy\" /\u003e\n```\n\n#### Simple image\n\n```smarty\n{widget name='pixel_image_optimizer'\n    image_path='img/cms/image.jpg'\n    quality=90\n    height=600\n}\n```\n\nResult:\n\n```html\n\u003cimg src=\"https://www.example.com/img/web/image-800x600-90.jpg\"\n     width=\"800\"\n     height=\"600\"\n     loading=\"lazy\" /\u003e\n```\n\n#### Responsive image\n\n```smarty\n{widget name='pixel_image_optimizer'\n    image_path='img/cms/image.jpg'\n    quality=90\n    width=1200\n    breakpoints='500,800'\n}\n```\n\nResult:\n\n```html\n\u003cpicture\u003e\n    \u003csource media=\"(max-width: 800px)\" srcset=\"https://www.example.com/img/web/image-800x400-90.jpg\" /\u003e\n    \u003csource media=\"(max-width: 500px)\" srcset=\"https://www.example.com/img/web/image-500x250-90.jpg\" /\u003e\n    \u003cimg src=\"https://www.example.com/img/web/image-1200x600-90.jpg\" loading=\"lazy\" /\u003e\n\u003c/picture\u003e\n```\n\n### Custom template\n\nYou can create your own template to display image.\n\nCreate a new template file in the **pixel_image_optimizer** directory for your theme:\n\n*themes/{themeName}/modules/pixel_image_optimizer/custom.tpl*\n\nAdd the **template** option in the widget with the template path:\n\n```smarty\n{widget name='pixel_image_optimizer'\n    image_path='img/cms/image.jpg'\n    width=1200\n    template='module:pixel_image_optimizer/custom.tpl'\n}\n```\n\n## Clear image cache\n\nManually remove the `img/web` directory content, or use the **Clear Image Cache** button from admin:\n\n*Advanced Parameters \u003e Performance \u003e Clear Image Cache*","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixel-open%2Fprestashop-image-optimizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpixel-open%2Fprestashop-image-optimizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixel-open%2Fprestashop-image-optimizer/lists"}