compress image

compress image

by Joko Christian -
Number of replies: 0

I'm trying to compress the image on moodle server, so far:

  1. I have tried to use optipng and jpegoptim in the server (elearning filedir/) (Linux Centos server)
  2. of course the hash value is changed, so i rename the file to the new hash value 
  3. and repositioned the location according to the first 2digithash/second2digithash/
  4. change the value of field "content hash" in database table "mdl3w_files"

I though I had succesfully  compress the image. The compressed image did show up briefly (example in quiz preview) , but few moments later it does not (after the page loads completely).

think there is a script that check another hash value that runs in the end of the page load.

so the question is :

  1. does anybody knew any image / pdf compressor script /app that can compress image /pdf already saved in the moodle server?
  2. OR, any step that I missed above? perhaps another table that being used to crosscheck hash?
  3. OR plugin to compress image as the user uploads it in moodle? (i only find the ones that resize it as the user retrieve the image in browser)

thanks ini advance.

Attachment 1.jpg
Attachment 2.png
Average of ratings: -