In CollectiveAccess (CA) Pawtucket2 part (public site), GIF images are not animated by default. Here is a way to let GIF images to be animated.
This tutorial is tested for CollectiveAccess 1.7.17 and 2.0.9 but may work with intermediate and later versions.
Modifications in Providence
1. media_processing.conf
The configuration file media_processing.conf (in Providence’s app/conf or app/conf/local directory) is used to set how any media file is treated or transformed before saving.
GIF images should be treated differently as other images format. They must be saved in GIF format.
In this file, create a new line for this mimetype, named image_gif for example:
MEDIA_ACCEPT = {
image/jpeg = image,
# image/gif = image,
image/gif = image_gif,
image/png = image,
…
}
In the MEDIA_TYPE = {…} part, insert this new part with same name, just after the image part:
image_gif = {
QUEUE = mediaproc,
QUEUED_MESSAGE = _(« Image is being processed »),
QUEUE_USING_VERSION = original,
VERSIONS = {
icon = {
RULE = rule_icon_image_gif, VOLUME = images, BASIS = large,
QUEUE_WHEN_FILE_LARGER_THAN = <queue_threshold_in_bytes>
},
iconlarge = {
RULE = rule_iconlarge_image_gif, VOLUME = images, BASIS = large,
QUEUE_WHEN_FILE_LARGER_THAN = <queue_threshold_in_bytes>
},
tiny = {
RULE = rule_tiny_image_gif, VOLUME = images, BASIS = large,
QUEUE_WHEN_FILE_LARGER_THAN = <queue_threshold_in_bytes>
},
thumbnail = {
RULE = rule_thumbnail_image_gif, VOLUME = images, BASIS = large,
QUEUE_WHEN_FILE_LARGER_THAN = <queue_threshold_in_bytes>
},
widethumbnail = {
RULE = rule_widethumbnail_image_gif, VOLUME = images, BASIS = large,
QUEUE_WHEN_FILE_LARGER_THAN = <queue_threshold_in_bytes>
},
small = {
RULE = rule_small_image_gif, VOLUME = images, BASIS = large,
QUEUE_WHEN_FILE_LARGER_THAN = <queue_threshold_in_bytes>
},
preview = {
RULE = rule_preview_image_gif, VOLUME = images, BASIS = large,
QUEUE_WHEN_FILE_LARGER_THAN = <queue_threshold_in_bytes>
},
preview170 = {
RULE = rule_preview170_image_gif, VOLUME = images, BASIS = large,
QUEUE_WHEN_FILE_LARGER_THAN = <queue_threshold_in_bytes>
},
widepreview = {
RULE = rule_widepreview_image_gif, VOLUME = images, BASIS = large,
QUEUE_WHEN_FILE_LARGER_THAN = <queue_threshold_in_bytes>
},
medium = {
RULE = rule_medium_image_gif, VOLUME = images, BASIS = large,
QUEUE_WHEN_FILE_LARGER_THAN = <queue_threshold_in_bytes>
},
mediumlarge = {
RULE = rule_mediumlarge_image_gif, VOLUME = images, BASIS = large,
QUEUE_WHEN_FILE_LARGER_THAN = <queue_threshold_in_bytes>
},
large = {
RULE = rule_large_image_gif, VOLUME = images,
QUEUE_WHEN_FILE_LARGER_THAN = <queue_threshold_in_bytes>
},
page = {
RULE = rule_page_image_gif, VOLUME = images, BASIS = large,
QUEUE_WHEN_FILE_LARGER_THAN = <queue_threshold_in_bytes>
},
original = {
RULE = rule_original_image_gif, VOLUME = images,
USE_EXTERNAL_URL_WHEN_AVAILABLE = <use_external_url_when_available>
},
tilepic = {
RULE = rule_tilepic_image_gif, VOLUME = tilepics,
QUEUE_WHEN_FILE_LARGER_THAN = <queue_threshold_in_bytes>
}
},
MEDIA_VIEW_DEFAULT_VERSION = tilepic,
MEDIA_PREVIEW_DEFAULT_VERSION = small
},
And in the MEDIA_TRANSFORMATION_RULES = {…} part, add related rules:
# ———————————————————
# Image rules for GIF
# ———————————————————
rule_icon_image_gif = {
SCALE = {
width = 72, height = 72, mode = fill_box, antialiasing = 0.5
},
SET = {format = image/gif}
},
rule_iconlarge_image_gif = {
SCALE = {
width = 250, height = 250, mode = fill_box, antialiasing = 0.5
},
SET = {format = image/gif}
},
rule_tiny_image_gif = {
SCALE = {
width = 72, height = 72, mode = bounding_box, antialiasing = 0.5
},
SET = {format = image/gif}
},
rule_thumbnail_image_gif = {
SCALE = {
width = 120, height = 120, mode = bounding_box, antialiasing = 0.5
},
SET = {format = image/gif}
},
rule_widethumbnail_image_gif = {
SCALE = {
width = 110, height = 75, mode = fill_box, crop_from = center, antialiasing = 0.5
},
SET = {format = image/gif}
},
rule_preview170_image_gif = {
SCALE = {
width = 170, height = 170, mode = bounding_box, antialiasing = 0.5
},
SET = {format = image/gif}
},
rule_widepreview_image_gif = {
SCALE = {
width = 200, height = 120, mode = fill_box, crop_from = center, antialiasing = 0.5
},
SET = {format = image/gif}
},
rule_preview_image_gif = {
SCALE = {
width = 180, height = 180, mode = bounding_box, antialiasing = 0.5
},
SET = {format = image/gif}
},
rule_small_image_gif = {
SCALE = {
width = 240, height = 240, mode = bounding_box, antialiasing = 0.5
},
SET = {format = image/gif}
},
rule_medium_image_gif = {
SCALE = {
width = 400, height = 400, mode = bounding_box, antialiasing = 0.5
},
SET = {format = image/gif}
},
rule_mediumlarge_image_gif = {
SCALE = {
width = 580, height = 450, mode = bounding_box, antialiasing = 0.5
},
SET = {format = image/gif}
},
rule_large_image_gif = {
SCALE = {
width = 700, mode = width, antialiasing = 0.5
},
SET = {format = image/gif}
},
rule_page_image_gif = {
SCALE = {
width = 1000, mode = width, antialiasing = 0.5
},
SET = {format = image/gif}
},
rule_original_image_gif = {},
rule_tilepic_image_gif = {
SET = {tile_mimetype = image/gif, format = image/tilepic}
},
2. media_display.conf
The configuration file media_display.conf (in Providence’s app/conf or app/conf/local directory) is used to assign which viewer is used for which image format.
In the default_viewers = {…} part of this file, one can find different sub-parts named: images, video, quicktimevr, audio, pdf, text, 3d, 360, binary.
GIF format appears in the images sub-part, as defined in the mimetypes list: image/gif
mimetypes = {image/gif, image/jpeg, image/tiff, image/png, image/x-dcraw, image/x-psd, image/x-dpx, image/jp2, image/x-adobe-dng, image/x-dcraw, application/dicom, image/bmp, image/x-bmp, image/webp},
and assigned viewer is TileViewer:
viewer = TileViewer
But it seems that TileViewer isn’t displaying correctly animated GIF images.
To resolve this issue, I suggest switching to QTVR as this viewer.
To do so, create a new part in default_viewers dedicated to GIF format, which we will call image_gif. Remove the mimetype image/gif from the list of mimetypes of images part and add it in the list of mimetypes for image_gif, like this:
default_viewers = {
image_gif = {
mimetypes = {image/gif},
viewer = QTVR
},
images = {
# mimetypes = {image/gif, image/jpeg, image/tiff, image/png, image/x-dcraw, image/x-psd, image/x-dpx, image/jp2, image/x-adobe-dng, image/x-dcraw, application/dicom, image/bmp, image/x-bmp},
mimetypes = {image/jpeg, image/tiff, image/png, image/x-dcraw, image/x-psd, image/x-dpx, image/jp2, image/x-adobe-dng, image/x-dcraw, application/dicom, image/bmp, image/x-bmp, image/webp},
viewer = TileViewer
},
…
…
}
Flush the cache files. Add a GIF image in an object representation to see if it works.
Modifications in Pawtucket
The configuration file media_display.conf (in Pawtucket’s app/conf or app/conf/local directory) is used to assign which viewer is used for which image format.
Apply the same modifications as seen above for the Providence.
Flush the cache files and test it.
For an example of application see this object:
https://collections.univ-pau.fr/pub/index.php/Detail/objects/605
Choose the second image:
![]()
You should see the animated GIF:

