Skip to content

Commit

Permalink
Merge pull request #21 from nicolashmln/feat/strapi-v4
Browse files Browse the repository at this point in the history
Feat/strapi v4
  • Loading branch information
nicolashmln authored Dec 17, 2022
2 parents 577adde + 31cc0c0 commit 4b63493
Show file tree
Hide file tree
Showing 38 changed files with 1,144 additions and 804 deletions.
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ko_fi: nicolashmln
21 changes: 9 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,29 +30,24 @@ yarn build

## Setup

We need to override the _image manipulation_ of the _upload_ plugin and use the one from this plugin. So we need to add a `image-manipulation.js` file within the `extensions/upload/services/` folder.
We 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.

e.g

```bash
mkdir -p extensions/upload/services/
touch extensions/upload/services/image-manipulation.js
mkdir -p src/extensions/upload/strapi-server.js
touch src/extensions/upload/strapi-server.js
```

Paste the code below in the file.

```javascript
"use strict";
/**
* Image manipulation functions
*/
const imageManipulation = require("strapi-plugin-responsive-image/server/services/image-manipulation");

const {
generateResponsiveFormats,
} = require("strapi-plugin-responsive-image/extensions/upload/services/image-manipulation.js");
module.exports = (plugin) => {
plugin.services["image-manipulation"] = imageManipulation;

module.exports = {
generateResponsiveFormats,
return plugin;
};
```

Expand Down Expand Up @@ -84,3 +79,5 @@ The plugin uses [sharp](https://github.com/lovell/sharp) to resize the image.

- Better UI/UX, maybe like the settings of the webhooks
- Add re-generate button to re-generate all the formats if we change the settings

[![ko-fi](https://ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/E1E0H3N9M)
38 changes: 0 additions & 38 deletions admin/src/components/Text/index.js

This file was deleted.

26 changes: 0 additions & 26 deletions admin/src/containers/Initializer/index.js

This file was deleted.

153 changes: 0 additions & 153 deletions admin/src/containers/Settings/ImageFormat.js

This file was deleted.

7 changes: 0 additions & 7 deletions admin/src/containers/Settings/SectionTitleWrapper.js

This file was deleted.

17 changes: 0 additions & 17 deletions admin/src/containers/Settings/Wrapper.js

This file was deleted.

Loading

0 comments on commit 4b63493

Please sign in to comment.