Bug 39002 - Unable to import XPM local cover image
Summary: Unable to import XPM local cover image
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-30 16:13 UTC by Caroline Cyr La Rose
Modified: 2025-01-30 16:13 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Caroline Cyr La Rose 2025-01-30 16:13:52 UTC
I stumbled upon this by accident, I don't know if this functionality is used very much, or at all.

Note: I used the image teapot.xpm on this page https://people.math.sc.edu/Burkardt/data/xpm/xpm.html to test. I also tried to make one with GIMP with the same result.

To recreate:
1. Enable LocalCoverImages
   1.1. Go to Administration > System preferences
   1.2. Search for LocalCoverImages
   1.3. Change the value to 'Show'
   1.4. Click 'Save all Enhanced content preferences'

2. Import an XPM image as a cover image
   2.1. Download the teapot.xpm image from the site above, or another .xpm image
   2.2. Search for a record and go to the detailed page
   2.3. Click the 'Images (0)' tab
   2.4. Click 'Upload'
        --> Note that the help message above the box to select a file says 'The tool will accept images in GIF, JPEG, PNG, and XPM formats.'
   2.5. Click 'Drop files here or click to select a file'
   2.6. Choose the .xpm image
        --> Note that at this point, the image preview is a broken image
   2.7. Click 'Process images'
        --> Error message: 'Cannot process file as an image. Please ensure you only upload GIF, JPEG, PNG, or XPM images.'

I opened the teapot.xpm image in GIMP and it opens fine. It's not corrupted as far as I know.

I think we should either fix the XPM import or remove the mention that the tool accepts XPM format.