psu-libraries / cho

Project for Penn State Library's cultural heritage object repository.
Apache License 2.0
18 stars 2 forks source link

Can provide representative images for collections #1049

Closed rschenk closed 5 years ago

rschenk commented 5 years ago

Description

Representative images for a collection can be placed in public/collection-images. If the collection's id is "pstsc_09844", then placing an image file into that directory with the same name will pick it up. You can provide images in: jpg, jpeg, png, or gif extensions. Thus all of the following images would be valid for the aforementioned collection:

public/collection-images/pstsc_09844.jpg
public/collection-images/pstsc_09844.jpeg
public/collection-images/pstsc_09844.png
public/collection-images/pstsc_09844.gif

Please note that for sanity's sake, the collection's id is downcased before searching the filesystem. Thus a collection with id "PTSC_09844" should have an its image file downcased like so: pstsc_09844.jpg

If no representative image is provided, then public/collection-images/default.png is rendered.

Connected to #897

Changes

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.005%) to 99.439% when pulling 8754e452cae0da29c94f2507f5b902ca025dc50a on i#897-representative-imagery into 354eb3aea53747b04de57a227dbbf3438aee41e3 on master.