If you are collecting a lot of photos with service requests or workorder you may start wasting a lot of disk space in the DOCLINCS folder.
Here is a small script I have developed for one of our clients to resize JPEG files in the doclinks folder using ImageMagick open-source software.
Download the application from the ImageMagick website. I have downloaded the Windows x64 portable version ImageMagick-7.1.2-15-portable-Q16-x64.7z file. Extract the archive on one of the application servers.
Create the following script (imgresize.cmd):
@SET MAGICKDIR=C:\MyTemp\ImgResize\ImageMagick
@SET SRCFILES=C:\MyTemp\ImgResize\imgtest\*.jpg
FOR /F "DELIMS=" %%A IN ('DIR /A-D /S /B "%SRCFILES%"') DO %MAGICKDIR%\mogrify -resize 1920x1920^> "%%~A"
Adjust the MAGICKDIR and SRCFILES parameters in the script according to your configuration.
The script will process all files with JPG extension in your MAGICKDIR folder and subfolders resizing photos to a maximum resolution of 1920×1920. The file names will not change so you don’t have to update links in Maximo.
Be careful before using the script on you DOCLINKS folder. Fist test it on a small set of files and make a backup of your files first.
