@uxf/resizer 11.38.3 → 11.40.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxf/resizer",
3
- "version": "11.38.3",
3
+ "version": "11.40.1",
4
4
  "main": "index.js",
5
5
  "description": "UXF Resizer",
6
6
  "author": "UXFans <dev@uxf.cz>",
package/src/next-route.js CHANGED
@@ -51,6 +51,10 @@ async function StaticGET(request) {
51
51
  if (params === undefined) {
52
52
  return Response.error();
53
53
  }
54
+ // import usage: _next/static/media/example-logo-resizer.941ec59a => example-logo-resizer
55
+ if (params.filename.startsWith("_next/static/media/")) {
56
+ params.filename = params.filename.replace("_next/static/media/", "").replace(/\.[^.]*$/, "");
57
+ }
54
58
  const generatedFilename = process.cwd() + path;
55
59
  (0, log_1.log)(`Generated filename: ${generatedFilename}`);
56
60
  const contentType = (_b = tools_1.CONTENT_TYPES[params.toFormat]) !== null && _b !== void 0 ? _b : "image/jpeg";
package/src/next-route.ts CHANGED
@@ -36,6 +36,11 @@ export async function StaticGET(request: Request) {
36
36
  return Response.error();
37
37
  }
38
38
 
39
+ // import usage: _next/static/media/example-logo-resizer.941ec59a => example-logo-resizer
40
+ if (params.filename.startsWith("_next/static/media/")) {
41
+ params.filename = params.filename.replace("_next/static/media/", "").replace(/\.[^.]*$/, "");
42
+ }
43
+
39
44
  const generatedFilename = process.cwd() + path;
40
45
  log(`Generated filename: ${generatedFilename}`);
41
46