On Server Image Optimization
#21
(2017-10-20, 12:10:40 am)malikshah32175 Wrote:  Thanks, man. images load very fast, what if i downgrade it to 4 colours like just for image seo

You can do a lot for optimized images and using a color profile with less colors is one thing. But what exactly do you mean with "4 colors"? A color profile with only 4 colors? Does such a thing even exist? As far as I know most software works with RGB or sRGB at the moment. Photoshop has its own additional profiles but these are usually not compatible and browsers and such display the colors different than they actually are.

And at some point the picture will look like potato mash if you overoptimize it. Dithering however really is a technique that is used to generally optimize graphical performance by lowering the amount of used colors.
#22
(2015-06-14, 3:24:40 am)situnrocks Wrote:  Facing this issue :


Code:
[root@** uploads]# cd 2015
[root@** 2015]# find . -iname *.jp*g -type f -print0 | xargs -0 jpegoptim -o --strip-all
xargs: jpegoptim: Argument list too long
[root@** 2015]# cd 06
[root@** 06]# find . -iname *.jp*g -type f -print0 | xargs -0 jpegoptim -o --strip-all
find: paths must precede expression
Usage: find [-H] [-L] [-P] [path...] [expression]


Either list too long error, in sub dir also another error.

Any solutions ?


Why not try this...


Code:
cd ../images-folder/
for i in *;do jpegoptim "$i";done

Or in a script to find all jpg files in the required folder and all it's subfolders.
Code:
#!/bin/bash
FILES=$(find /required/directory/here -type f -name '*.jpg')
for f in $FILES
do
  jpegoptim $f
done
#23
The command below has been updated to fix an issue.
Code:
find . -iname *.jp*g -type f -print0 | xargs -0 jpegoptim -o --strip-all

This is the updated version.
Code:
find . -iname "*.jp*g" -type f -print0 | xargs -0 jpegoptim -o --strip-all


This tiny update fixes issues regarding the following error type(s) that were brought up by @situnrocks.
Quote:find: paths must precede expression




Users browsing this thread: 1 Guest(s)