Skip to content

Commit fe91a64

Browse files
authored
Merge pull request #43 from UnKnoWn-Consortium/compat-fix-strapi-4.15.1
fix: import `@strapi/upload` components with the newly defined exports since v4.15.1
2 parents 543f9c6 + 897f8e4 commit fe91a64

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "strapi-plugin-responsive-image",
3-
"version": "1.1.0",
3+
"version": "1.2.0",
44
"description": "Custom responsive image formats for strapi.",
55
"strapi": {
66
"name": "responsive-image",
@@ -30,7 +30,7 @@
3030
"media"
3131
],
3232
"engines": {
33-
"node": ">=14.19.1 <=18.x.x",
33+
"node": ">=18.0.0 <=20.x.x",
3434
"npm": ">=8.0.0"
3535
},
3636
"license": "MIT"

server/services/image-manipulation.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ const {
1111
file: { bytesToKbytes },
1212
} = require("@strapi/utils");
1313
const { getService } = require("../utils");
14-
const imageManipulation = require("@strapi/plugin-upload/server/services/image-manipulation");
14+
const pluginUpload = require("@strapi/plugin-upload/strapi-server");
15+
const imageManipulation = pluginUpload().services["image-manipulation"];
1516

1617
const writeStreamToFile = (stream, path) =>
1718
new Promise((resolve, reject) => {

0 commit comments

Comments
 (0)