jdaehne / imageoptimonupload Goto Github PK
View Code? Open in Web Editor NEWImageOptimOnUpload
ImageOptimOnUpload
Hi there!
When I want to add an image (original dimensions = 4001x2250px) in a resource via drag'n'drop into the content-input-field, the extra/plugin is working as expected (sytem-setting: imageoptimonupload.options - "1920"; the image gets uploaded with the correct width of 1920px)
But when I'm using the File Manager Upload, the plugin does not work. The image keeps the original dimensions 4001x2250px.
I'm getting this error message:
[2020-03-02 11:03:25] (ERROR @ /var/www/domain.org/htdocs/domain.de/modx/core/cache/includes/elements/modplugin/8.include.cache.php : 41) PHP warning: opendir(/var/www/domain.org/htdocs/domain.de/modx/veranstaltungen/2020-02/): failed to open dir: No such file or directory
[2020-03-02 11:03:28] (ERROR @ /var/www/domain.org/htdocs/domain.de/modx/core/cache/includes/elements/modplugin/26.include.cache.php : 100) imageOptimOnUpload (API Error):
[2020-03-02 11:03:28] (ERROR @ /var/www/domain.org/htdocs/domain.de/modx/core/model/modx/modx.class.php : 1671) [OnFileManagerUpload]array(10) {
[0]=>
string(37) "HTTP/1.1 404 Could not download image"
[1]=>
string(35) "Date: Mon, 02 Mar 2020 10:03:28 GMT"
[2]=>
string(49) "Content-Type: application/im2+json; charset=utf-8"
[3]=>
string(19) "Content-Length: 268"
[4]=>
string(17) "Connection: close"
[5]=>
string(30) "Server: ImageOptim/5.27.1 (qp)"
[6]=>
string(12) "Vary: Accept"
[7]=>
string(23) "cache-control: no-cache"
[8]=>
string(25) "im2-status: 404 UserError"
[9]=>
string(229) "im2-error: "Could not download image\nRequest to https://domain.de/modx/assets/images/veranstaltungen/2020-02/ShrinkingSpaces_Facebook_200204.png failed. The server at domain.de returned HTTP error 404 Not Found.""
}
1
I expected the plugin to work by using the file manager. What am I doing wrong?
MODX Version 2.7.2, imageoptimonupload-1.0.2-beta1
Hello,
I'm running your plugin on MODX 2.6.5 with fileSluggy: OnFileManagerUpload -> Priority = 1.
When the filename has spaces I get the error below:
[2018-08-15 14:39:28] (ERROR @ /paas/cXXXX/www/core/cache/includes/elements/modplugin/33.include.cache.php : 104) imageOptimOnUpload (API Error):
[2018-08-15 14:39:28] (ERROR @ /paas/cXXXX/www/core/model/modx/modx.class.php : 1611) [OnFileManagerUpload]array(3) {
[0]=>
string(24) "HTTP/1.1 400 Bad Request"
[1]=>
string(35) "Date: Wed, 15 Aug 2018 13:39:28 GMT"
[2]=>
string(17) "Connection: close"
}
Works fine when there are none.
Thanks
Hello, I was trying your extra and I found 2 issues:
Thanks mate.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.