diff --git a/scp/js/ticket.js b/scp/js/ticket.js
index aa808746c9b84e305eefbfb8db04d04cc78496b3..29030153a49023d91af1c448fde6a048a6ca7f91 100644
--- a/scp/js/ticket.js
+++ b/scp/js/ticket.js
@@ -433,7 +433,7 @@ showImagesInline = function(urls, thread_id) {
         ? '.thread-body img[data-cid]'
         : '.thread-body#thread-id-'+thread_id+' img[data-cid]';
     $(selector).each(function(i, el) {
-        var cid = $(el).data('cid'),
+        var cid = $(el).data('cid').toLowerCase(),
             info = urls[cid],
             e = $(el);
         if (info) {