Does anyone know what image extensions CIVI recognises.

I want to upload .TIF images to civi contacts. Is there a way to do this as the extension is not recognised.

Thanks, Andy


You can add file types in Safe File Extension Options in the admin console. (I don't know if it's advised, but it's certainly possible :)

Go to Administer > System Settings > Safe File Extensions, then click 'Add Safe File Extension'. Enter the file extension (without the dot) in the Label field, make sure it's enabled, then save.

Edit: However, this doesn't actually help with .tif files. TIFFs aren't meant for web use, so (presumably) the image processing in CiviCRM or the CMS isn't designed to deal with TIFF files - it looks like CiviCRM has an additional check to stop the upload because of this. There are probably modules for Drupal that will add this capacity (Imagemagick comes to mind), but I don't know if they'll be picked up by CiviCRM.

If you don't need the images to be TIFF files, I'd recommend using a progamme like Irfanview ( http://www.irfanview.com/ ) to convert them to jpgs.

If you do need to have the files as TIFFs, then add a custom file field for the contact record - this will allow you to upload the files, but won't display a thumbnail. (You can always upload a jpg version as well to get the thumbnail).

  • Hi, thank you for your reply. Unfortunately it didn't work and the file format is still not recognised. – A Davidson Nov 26 '15 at 12:06
  • Possibly your CMS has settings too, which override the CiviCRM settings? – ErikH - CiviCooP Nov 26 '15 at 12:23
  • Can I ask for more info about your setup? It's possible that Drupal/Joomla etc may have restrictions on file types as well. (edit: as @Erikh says!) What error message do you receive? – liblogger Nov 26 '15 at 12:29
  • Hi, thanks for the reply. Drupal and the message reads "Image could not be uploaded due to invalid type extension." – A Davidson Nov 26 '15 at 14:33
  • I found a good post on how to do this with Drupal, perhaps that might help? My idea is that Drupal does not allow your .tif file, even if CiviCRM does allow it. blog.ryantan.net/2011/04/drupal-7-handling-file-uploads And you can certainly take a peek on the Drupal Answers Stack Exchange! – ErikH - CiviCooP Nov 26 '15 at 14:58

I do think the extension check for uploading contact pictures is hard coded in CiviCRM. This might be on purpose or accidentialy.

  • Yeah, that might be the case - Wordpress doesn't stop you from uploading .tif files, but CiviCRM still stops the upload even when the extension is on the list. Presumably this relates to however they're processing the images? I don't know if CiviCRM uses the CMS's image processsing capacity. – liblogger Nov 26 '15 at 15:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.