varun-raj / immich-power-tools

Power tools for organizing your immich library
https://immich-power-tools.featureos.app/
409 stars 10 forks source link

Feature request: Resizing or Compressing images #19

Open dchakro opened 3 months ago

dchakro commented 3 months ago

Hi, is it in the scope of this project to resize or compress the images using mozcjpeg like this:

if /bin/ls | grep -Ei "jpg$" &> /dev/null ; then
        for file in *.jpg
        do
                  jpgFiles=("${jpgFiles[@]}" "$file")
        done
        for item in "${jpgFiles[@]}"
        do 
            mv "${item}" "moz.bak_${item}"
            mozcjpeg -quality 75 -quant-table 3 -progressive "moz.bak_${item}" >| "${item}"
                         rm "moz.bak_${item}"
        done
fi

Or using imagemagick to reduce the size?

        if /bin/ls | grep -Ei "heic$" &> /dev/null ; then
        mogrify -resize 70% *.heic
    fi

Or convert JPEGs to HEIC:

                 for file in *.jpg
        do
                    jpgFiles=("${jpgFiles[@]}" "$file")
        done
        for item in "${jpgFiles[@]}"
        do 
            magick "${item}" "${item}.heic"
        done

Or is doing soemthing like this out of the scope of this project? The reason I'm asking is because the devs of immich have mentioned that this is not one of their goals and is out of the scope of their project.

So far, I manually run these BEFORE I import large number of files, but it gets tedious. I was hoping there would be a way to run this on the library or a few albums inside the library.

varun-raj commented 3 months ago

Hey @dchakro

This is an interesting one, tracking the FR here: https://immich-power-tools.featureos.app/p/feature-request-resizing-or-compressing-images