Koha-clms/tools
Hammat Wele 63a1924b27
Bug 33857: Avoid increasing file size while uploading image
This patch prevents image size from increasing while uploading by
keeping the original image format

Test plan:

1. Download the attached image large-image.jpg
  --> It should be ~170kB and 1000×1500 pixels
2. Enable LocalCoverImages in System preferences
3. Find a record in the staff interface
4. Go to "Images" tab
5. Upload large-image.jpg image
   5.1. Click on "Upload"
   5.2. Click on "Drop files here or click to select a file"
   5.3. Choose picture (large-image.jpg)
   5.4. Click on "Process images"
6. Click on image for large image
7. Right-click on the image and save it
  --> It is ~930kB and 600x900 pixels

8. Apply the patch and flush browser cache (Crtl+F5) to update js files
9. Detele the previous uploaded image
10. Repeat step 3, 4, 5, 6, 7
   --> The image is ~92kB and 600x900 pixels
11. prove t/db_dependent/Koha/CoverImages.t
   --> All tests should be successful

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk>
2026-03-24 09:55:52 +01:00
..
csv-profiles MT2116: Addons to the CSV export 2010-02-17 07:51:33 -05:00
access_files.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
additional-contents.pl Bug 41614: available options template params also needed for op=list 2026-03-24 07:48:24 +01:00
ajax-inventory.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
automatic_item_modification_by_age.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
batchMod.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
batch_delete_records.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
batch_extend_due_dates.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
batch_modify_holds.pl Bug 41438: Do not always unsuspend holds when using batch modify holds tool 2026-01-16 14:07:16 -07:00
batch_record_modification.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
batch_records_ajax.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
cleanborrowers.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
copy-holidays.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
csv-profiles.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
exceptionHolidays.pl Bug 38664: Tidy the whole codebase 2025-02-11 14:58:24 +01:00
export.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
holidays.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
import_borrowers.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
inventory.pl Bug 38946: Add enumchron to inventory table 2026-02-27 11:38:33 -07:00
letter.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
manage-marc-import.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
marc_modification_templates.pl Bug 40031: Redirect to add action page from add template form 2026-01-23 07:29:02 -07:00
modborrowers.pl Bug 40843: Sort patron attributes by description 2025-11-19 12:28:16 -07:00
newHolidays.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
overduerules.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
page.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
picture-upload.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
problem-reports.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
quotes-upload.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
quotes.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
scheduler.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
showdiffmarc.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
stage-marc-import.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
stockrotation.pl Bug 41076: Adjust our perl tidiness for v20250105 2026-02-05 09:03:51 -07:00
tools-home.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
upload-cover-image.pl Bug 33857: Avoid increasing file size while uploading image 2026-03-24 09:55:52 +01:00
upload-file.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
upload.pl Bug 40163: Fix several http addresses in the code docs 2025-09-23 16:21:29 -06:00
viewlog.pl Bug 20956: (QA follow-up) Restore info pretty 2026-03-23 10:42:16 +01:00