{"id":13472597,"url":"https://github.com/nicolashmln/strapi-plugin-responsive-image","last_synced_at":"2025-04-05T00:09:43.917Z","repository":{"id":47243572,"uuid":"270551102","full_name":"nicolashmln/strapi-plugin-responsive-image","owner":"nicolashmln","description":"Custom responsive image formats for https://strapi.io","archived":false,"fork":false,"pushed_at":"2024-04-19T08:36:53.000Z","size":742,"stargazers_count":163,"open_issues_count":14,"forks_count":31,"subscribers_count":5,"default_branch":"main","last_synced_at":"2025-03-28T23:09:09.909Z","etag":null,"topics":["plugin","resizing-images","responsive","responsive-images","strapi","strapijs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nicolashmln.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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,"dei":null,"publiccode":null,"codemeta":null},"funding":{"ko_fi":"nicolashmln"}},"created_at":"2020-06-08T06:10:09.000Z","updated_at":"2025-03-18T11:23:06.000Z","dependencies_parsed_at":"2024-01-16T07:23:58.825Z","dependency_job_id":"7b17e1d3-2584-42c7-afac-f306d12b7eeb","html_url":"https://github.com/nicolashmln/strapi-plugin-responsive-image","commit_stats":{"total_commits":49,"total_committers":5,"mean_commits":9.8,"dds":"0.10204081632653061","last_synced_commit":"86ffacfb4fae6a2e491844b956909b78118b7a5f"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolashmln%2Fstrapi-plugin-responsive-image","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolashmln%2Fstrapi-plugin-responsive-image/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolashmln%2Fstrapi-plugin-responsive-image/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nicolashmln%2Fstrapi-plugin-responsive-image/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nicolashmln","download_url":"https://codeload.github.com/nicolashmln/strapi-plugin-responsive-image/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247266565,"owners_count":20910836,"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":["plugin","resizing-images","responsive","responsive-images","strapi","strapijs"],"created_at":"2024-07-31T16:00:56.109Z","updated_at":"2025-04-05T00:09:43.897Z","avatar_url":"https://github.com/nicolashmln.png","language":"JavaScript","funding_links":["https://ko-fi.com/nicolashmln","https://ko-fi.com/E1E0H3N9M"],"categories":["Strapi v3","\u003ca name='PluginProviders'\u003e\u003c/a\u003ePlugin \u0026 Providers"],"sub_categories":["Plugin \u0026 Providers - v3","\u003ca name='CommunityPlugins'\u003e\u003c/a\u003eCommunity Plugins"],"readme":"# Strapi plugin responsive-image\n\nCustom responsive image formats for https://strapi.io v4 (For strapi v3 use v0.5.0)\n\n\u003cdiv\u003e\n  \u003cimg src=\"assets/screenshot_settings.png\" alt=\"Screenshoot settings\"\u003e\n\u003c/div\u003e\n\n## How it works\n\n- Go to the settings and choose the **Responsive image** menu\n- Add/edit the formats\n- Upload a new media and it will have the new formats automatically generated\n\n## Installation\n\nUsing npm\n\n```bash\nnpm install --save strapi-plugin-responsive-image\nnpm run build\n```\n\nUsing yarn\n\n```bash\nyarn add strapi-plugin-responsive-image\nyarn build\n```\n\n## Setup\n\nWe need to override the _image manipulation_ of the _upload_ plugin and use the one from this plugin. So we need to add a `strapi-server.js` file within the `src/extensions/upload/strapi-server.js` folder.\n\ne.g\nFor Javascript:\n\n```bash\nmkdir -p src/extensions/upload/\ntouch src/extensions/upload/strapi-server.js\n```\n\nPaste the code below in the file.\n\n\n\n```javascript\nconst imageManipulation = require(\"strapi-plugin-responsive-image/server/services/image-manipulation\");\n\nmodule.exports = (plugin) =\u003e {\n  plugin.services[\"image-manipulation\"] = imageManipulation;\n\n  return plugin;\n};\n```\n\n---\n\nFor Typescript:\n\n```bash\nmkdir -p src/extensions/upload/\ntouch src/extensions/upload/strapi-server.ts\n```\n\nPaste the code below in the file.\n\n```typescript\nconst imageManipulation = require(\"strapi-plugin-responsive-image/server/services/image-manipulation\");\n\nexport default (plugin) =\u003e {\n  plugin.services[\"image-manipulation\"] = imageManipulation();\n\n  return plugin;\n};\n```\n\nNow when you'll upload a file you'll have the formats of the settings page.\n\n## Global options\n\nThe plugin uses [sharp](https://github.com/lovell/sharp) to resize the image.\n\n| Input       | Description                      |\n| ----------- | -------------------------------- |\n| Quality     | Quality, integer 1-100           |\n| Progressive | Use progressive (interlace) scan |\n\n## Format options\n\n| Input               | Description                                                                                                                                              |\n| ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Name                | **Required** Name of the format. The file generated will look like `name_file_uploaded_hash.jpeg`                                                        |\n| Generate x2 version | If ON it generates a format `name_x2` with a width and a height twice bigger                                                                             |\n| Output format       | The output format of your images: Same as source, JPEG, PNG, WebP or AVIF                                                                                |\n| Width               | **Required** Width of the image                                                                                                                          |\n| Height              | Height of the image                                                                                                                                      |\n| Fit                 | How the image should be resized to fit both provided dimensions. [More info](https://sharp.pixelplumbing.com/api-resize#parameters)                      |\n| Position            | To use when fit is cover or contain. [More info](https://sharp.pixelplumbing.com/api-resize#parameters)                                                  |\n| Without enlargement | Do not enlarge if the width or height are already less than the specified dimensions. [More info](https://sharp.pixelplumbing.com/api-resize#parameters) |\n\n## TODO\n\n- Better UI/UX, maybe like the settings of the webhooks\n- Add re-generate button to re-generate all the formats if we change the settings\n\n[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/E1E0H3N9M)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicolashmln%2Fstrapi-plugin-responsive-image","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnicolashmln%2Fstrapi-plugin-responsive-image","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnicolashmln%2Fstrapi-plugin-responsive-image/lists"}