(2014-10-31, 22:11:40)Timbow Wrote: Love this plugin. Always use it.
Recently I needed to exclude an image from resizing, eg I wanted to link to a massive hi res image. I had to ftp it to another location and manually edit the link. Not a big issue I know but I presume it would be easy to exclude resizing from a folder of a given name, so say data/uploads/fullsize can have full size images.
A quick patch, for version 1.0
Edit Imagizer.php, find this (line 26):
Code:
function imagizer_handle(){
Just after that (in line 27), insert this:
Code:
if (defined('IMAGIZEREXCLUDE') && isset($_POST['path']) && (trim($_POST['path'],'/') == trim(IMAGIZEREXCLUDE,'/'))) return;
And now in gsconfig.php you can specify the subfolder (relative to data/uploads) you want to exclude from resizing, like this:
Code:
define('IMAGIZEREXCLUDE','fullsize');
Thanks for the idea. Probably will made another option in settings - fullsized-image folder.
(2014-11-25, 04:56:02)Carlos Wrote: And now in gsconfig.php you can specify the subfolder (relative to data/uploads) you want to exclude from resizing, like this:
Code:
define('IMAGIZEREXCLUDE','fullsize');
Beautiful solution, this would have come in handy on quite a few projects. Is there any chance the plugin and instructions will be updated on Extend to reflect this new feature?
I've updated Imagizer to version 1.1.
Changelog:
* Minor i18n bugfix.
* Exclude folder option added.
The exclude folder may be defined in 2 ways: using
PHP Code:
define('IMAGIZEREXCLUDE','fullsize');
in gsconfig.php (thanks to @Carlos) or by filling input in Advanced section. Imagizer will check for excluded string value occurrence in full upload path.
Thanks every one for using Imagizer and all your support and feedback!
Hello,
I installed Imagizer on my localhost to test on GSCMS, and it is not working with files of an approximate size of 2.8M.
I have the following error :
Error : the file could not be uploaded.
My configuration is the following : GS CMS 3.3.4
line GSNOUPLOADIFIY uncommented in the gsconfig.php file
Chmod 777 on the imagizer folder in the plugins
chmod 666 on the config.xml file in the imagizer folder.
Do you know what could be the cause of this error ? I tried to enter the debug mode, but could not find anywhere the logs corresponding to my error.
(2015-01-14, 20:10:06)AndreaP Wrote: Hello,
I installed Imagizer on my localhost to test on GSCMS, and it is not working with files of an approximate size of 2.8M.
I have the following error :
Error : the file could not be uploaded.
My configuration is the following : GS CMS 3.3.4
line GSNOUPLOADIFIY uncommented in the gsconfig.php file
Chmod 777 on the imagizer folder in the plugins
chmod 666 on the config.xml file in the imagizer folder.
Do you know what could be the cause of this error ? I tried to enter the debug mode, but could not find anywhere the logs corresponding to my error.
I am new to GS CMS.
Thank you very much,
Andréa
Hi,
First, GSNOUPLOADIFIY option needs to be uncommented only with GS 3.0, so you can comment this line in your 3.3.4 to use uploadify flash plugin.
Second, try uploading other images, non-image file (a .pdf for example) with Imagizer enabled and Imagizer disabled (you can enable/disable it in plugins section). If you cannot upload any file, then it's not Imagizer's fault.
Third, try uploading smaller images. If this succeeds, try to increase upload limit.
Fourth, check php and server (apache, nginx) logs for any warnings/errors/notices.
Hope, some of this will help.
With files smaller than 2MB (the upload limit) it works.
I thought that imagizer would resize the images before the upload so they fit the size set in the settings ?
So my client (in the future) would not have to care about the file size ?
(2015-01-16, 06:19:09)AndreaP Wrote: I thought that imagizer would resize the images before the upload so they fit the size set in the settings ?
No, Imagizer is triggered after file has been uploaded to your server and moved to the uploads folder.
(2015-01-16, 06:19:09)AndreaP Wrote: So my client (in the future) would not have to care about the file size ?
He will not with Imagizer enabled. However you must increase the limit, because your uploads are rejected by http-server itself and don't reach php script which receives, handles and resizes them.
2017-08-06, 22:08:11 (This post was last modified: 2017-08-07, 02:45:02 by Shasaar.)
Hello,
the Imagizer ain't working on my installation, the files have the same size as uploaded,
There's no error message or anything else.
Folder permissions are set as mentioned above.
No errors in errorlog and debug console stays silent.
I'm using Uploadify, cause the flash doesn't work.
I tried it on a different GS installation and it works there (also Uploadify).
Tried to disable all the plugins, no change.
That really is driving me nuts.
What may be the problem?
Edit: Ok, found the problem, the filename was *.JPG and that didn't work in that installation.
Changing the name to *.jpg made it work.
However, it worked on the other installation with the same picture, without flaw and with JPG being Uppercase.
What may cause this problem?
I'd be glad to have a chance and get rid of that strange behaviour.
Thanks in advance.
Shasaar
2017-08-09, 15:39:30 (This post was last modified: 2017-08-09, 15:40:53 by Bigin.)
Hi Shasaar,
I think, it's not the right approach, modifying the original image file size after the upload (unless desired by the client). For me there is absolutely no point in resizing the image if the original file is already on the server. The image should be resized before upload (in the Browser) https://gist.github.com/dcollien/312bce1270a5f511bf4a, or just after the upload during/before the output on the website. But that is just a personal opinion.
Besides, the plugin works very well for me, also with all those plugins (except "Search") you have mentioned, so the issue is somewhere else.
thank you for your reply.
I tried to find the step in Imagizer that "breaks", but I wasn't successful so far.
The name will be fetched by Imagizer in the right way (with *.JPG) but then I lost the trail.
Unfortunately, I'm not a programmer and all I know are the very, very few basics (like if, else and loops ).
That's why I also have no idea how to implement your snippet with the file resize in browser, but thank you for mentioning it .
2017-08-27, 19:52:42 (This post was last modified: 2017-08-27, 20:01:36 by Shasaar.)
Hello,
I've set the setting to exact size, landscape orientated.
When uploading a jpg-picture now that is portrait orientated, it gets a black background on both sides.
Unfortunately, the black background doesn't fit to the design of the page and I'd like to change the background to another color.
However, I wasn't successful.
Could somebody give me a hint please, why it's not working?
I've added the following lines to ImagizerImage.php:
thank you for your reply.
I tried to find the step in Imagizer that "breaks", but I wasn't successful so far.
The name will be fetched by Imagizer in the right way (with *.JPG) but then I lost the trail.
Unfortunately, I'm not a programmer and all I know are the very, very few basics (like if, else and loops ).
That's why I also have no idea how to implement your snippet with the file resize in browser, but thank you for mentioning it .
Have a nice sunday.
Cheers.
Shasaar
Alright, in case somebody is facing the same problem one day, here is a solution:
Add the following to upload.php of GS core files:
line 52: $extension = strtolower($extension);
The reason I had to find the solution was, that the customer was quite disappointed that he had to rename the files from his camera (which saves the pictures in *.JPG) before uploading and even tho he was really eager trying, he forgot every now and then.
Problem solved, case closed, let's face another one, next one is just around the corner .
Cheers.
Shasaar
(2017-08-27, 19:52:42)Shasaar Wrote: I've set the setting to exact size, landscape orientated.
When uploading a jpg-picture now that is portrait orientated, it gets a black background on both sides.
(2017-09-01, 05:47:26)Shasaar Wrote: Alright, in case somebody is facing the same problem one day, here is a solution:
Add the following to upload.php of GS core files:
line 52: $extension = strtolower($extension);
For me, this only works if Uploadify is disabled. Can you try it?
(2017-09-02, 00:56:26)hameau Wrote: Remember that editing core files is not recommended and changes will be lost when updating GS to a newer version.
Hello Nick,
thank you for your message.
Of course, you are right and I wish I could avoid GS-core & also plugin core changes but sometimes, it seems like there's no other choice.
My GS-config is set to:
Quote:# Use Uploadify to upload files?
define('GSNOUPLOADIFY', 1);
So I guess, it uses uploadify?
If I comment the line, I'm not able to upload anything cause the buttons are missing.
I also tried your fix for the image-background color but it didn't work, unfortunately.
However, I'm glad that it already works and so I can live with it.
The problem with the min/max setting is, that the pictures may have a different ratio, when getting uploaded.
So it could be that there's a 3:4 picture or a 16:9 picture.
I'm using a design of html5up.net and just a slightly different ratio of the picture, scrambles the design.
That's why I had to fix the image size. Of course, I could've fiddled with the CSS-styles but that would've taken ages probably and a fixed image size is a quick-fix .
Years ago, when CSS was still not so overloaded with stuff and features, things were easy to settle.
But nowadays, with the main.css of that design having around 2600 lines of CSS, it's almost impossible to make design-changes without screwing everything .
Well, at least, that's how I feel .
(2017-09-02, 01:46:43)Shasaar Wrote: My GS-config is set to:
Quote:# Use Uploadify to upload files?
define('GSNOUPLOADIFY', 1);
You have uploadify disabled – the logic is reversed (gsNOuploadify). It requires Flash, so if you don't have a Flash plugin in your browser, the upload button won't work.
If you have a blank upload button, you probably have Flash installed, but set to 'Always ask': in this case, you can click on the blank button and you will be prompted to allow the plugin. (This is the case for Firefox.)
Anyway, thank you for your original fix as it inspired me to find the uploadify one.
I had problems with the black bars on a site a couple of years ago and gave up looking for a solution. Sorry I couldn't help!
(2017-09-10, 23:23:19)hameau Wrote: Submitted as a patch to Zorato's github page.
Hey, I have merged the PR. Unfortunately, I can't upload the updated version to Extend Repository, getting
Quote:ERROR: Could not obtain plugins filename
error. Could you update it yourself or let me know what is the issue?
Anyway, thanks for your contribution and for still using this plugin. I'm glad people still find it useful!
Cheers.