-
- 23 Posts
hi,
i am not sure if this has to do with gallery or gallerriffic, or if it is just specific to modx, but i am trying to figure out why my images are compressed after i upload them to the gallery. is there a way to control this? i did a test with a jpg (orig size ~160K) and a png (orig size ~450K) and both were resized to ~70K.
i’m using modx revolution: MODx Revolution 2.0.4-pl2
thank you for any help!!!
-
- 23 Posts
i should note, maybe it doesn’t even have to do with the upload, when i go to view the items in my gallery, it appears they have the same K size of the image i uploaded.
-
- 159 Posts
i think it’s because gallery uses phpthumb to adjust the images before output.
Michael Shraibman( gOmp) | Freelance Design & Development | impossible is nothing...
-
- 23 Posts
is there a way to adjust this? i checked out phpThumbOf but it looks like it only adjusts the dimensions, unless i am not understanding it correctly
-
- 23 Posts
i couldn’t figure out a way to not have phpthumb without modifying the plugin. i don’t know enough about php. so all i did was add "q=95" on line 73 of galitem.class.php:
$assetsUrl .= ’connector.php?action=web/phpthumb&q=95’;
i know this is ghetto, and modx people might hate me. but i needed this plug in since there aren’t others, and i don’t have the time/knowledge to build my own given my current timeline.
-
- 45 Posts
So I know this is ancient but I found a way better solution and I had this problem recently so other people might still in the future...
Go to edit the variable that outputs the image and in the output options there should be a section that says "Additional phpThumb parameters:"
Just stick the q=95 in there...also, and this is just a guess but, i think the q stands for quality and seeing as 95 makes it much better, again, my guess is that this is out of 100...that could do with more research.
There is another way which would be better, which would be to stick an output modifier on the TV itself eg: [[+imageTV:phpthumbof=`q=95`]] i havent tried the latter but i really dont see why it wouldn't work.