oleksandrweblab / oc-image-compress-plugin Goto Github PK
View Code? Open in Web Editor NEWSimple compression and resize for images
License: MIT License
Simple compression and resize for images
License: MIT License
Hello,
It would be great to add permissions to access plugin settings page. I generally setup image compression during website development, and don't want to give access to that settings to the final customer.
Best regards,
Alex
Hi,
I've installed your plugin on my development environment (Xampp) and on my staging environment (CentOS Linux 7.4.1708).
When I upload an image:
$mannequin= new Mannequin();
$mannequin->name = Input::get('name');
...
$mannequin->save();
// ATTACHTHE IMAGES
if(Input::file('image_1')) {
$mannequin->images()->create(['data' => Input::file('image_1')]);
}
if(Input::file('image_2')) {
$mannequin->images()->create(['data' => Input::file('image_2')]);
}
if(Input::file('image_3')) {
$mannequin->images()->create(['data' => Input::file('image_3')]);
}
if(Input::file('image_4')) {
$mannequin->images()->create(['data' => Input::file('image_4')]);
}
if(Input::file('image_5')) {
$mannequin->images()->create(['data' => Input::file('image_5')]);
}
if(Input::file('image_6')) {
$mannequin->images()->create(['data' => Input::file('image_6')]);
}
image_1 to image_6 are compressed and added to my model as they should, at least on my development environment.
On my staging server however, I get the error message stating:
ErrorException: imagesx() expects parameter 1 to be resource, boolean given in /var/www/vhosts/domain.com/subdomains/testcase/vendor/october/rain/src/Database/Attach/Resizer.php:210
When I disable the compression plugin, everything seems to be working fine. What do you think might be the problem?
P.S.: Loving your plugin by the way. Many thanks for developing it. It was just what I needed. I'm sure we can get it working.
Hi Alexander,
Question; do you know of a way to compress images when they are uploaded via the media library?
I've noticed that admins don't take into account the filesizes of the uploaded images, causing the server space to fill up rapidly. If I'm not mistaken, there's supposed to be an event handler that is triggered after every upload.
Do you think we could extend the image compress plugin to take into account the media library?
Thanks for your answer.
Hello,
I noticed that I lose animation when I upload a gif that is resized by your plugin ?
Is it possible to ignore compression if the file extension is a gif ?
Best regards,
Alex
When enabling the resize option in the Image Compress plugin, setting a max height and max width seems to result in that smaller images are enlarged instead of left alone.
Let's say I have an image of 800x600 and I've set the max height and max width to 1600x900, then the original image is enlarged to 1600x900, resulting in a distorted image.
The correct behaviour (I think) should be that an image smaller than the max height and width should not be enlarged but should be left alone. Or maybe this could be a setting enlarge smaller images?
What would be your viewpoint? Again thanks for the great work.
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.