Confluence: Preview of .ai and .psd files?
Asked by Lotta Lilja:

For some reason, only certain image file formats show up as previews on our Confluence pages. .jpg, and .png, seem to work, but not .ai. And .psd only sketchily (i.e. for whatever reason not when saved into .psd format from the original .ai format). How do I solve this? I particularly need to show preview images in those two formats.

I have checked that the Confluence files add-on is enabled, and it is.


Answers:
author: Shannon S
body: Hi Lena,

Can you let me know what version of Confluence you're using?

I just tested 3 files on Confluence 6.7.0 and I can confirm the following:

* A .psd file previews normally.
* A .psd file that was previously a .ai file previews normally.
* A .ai file does **not** preview, as it is not expected to.

Here are the following filetypes that will preview per [Display Files and Images](https://confluence.atlassian.com/doc/display-files-and-images-245827130.html):  

|----------------------------------------------------|----------------------------------------|-------------------|
| * JPEG * PNG * TIFF * PSD * WMF * EMF * ICO * ICNS | * DOC * DOCX * PPT * PPTX * XLS * XLSX | * PDF * MP3 * MP4 |

I am not sure I understood your original post, but to clarify, you're saying that .psd files do preview sometimes but not always, such as when converted from .ai files?

Can you let me know the process you used to convert .ai to .psd so. I can test it on my instance?

Regards,

Shannon

comments: author: Lotta Lilja
body: Hi!

My Confluence is version 6.4.0. But it seems to be working now as it is supposed to with the previews, just like you say. The thing seems to be to save the .psd with rgb, otherwise the preview does not show up on the page. However, the size of a .psd preview cannot be changed in the same way as the size of a .jpg can but only in the three thumbnail sizes. I need to be able to change the .psd image size a bit more precisely. Is there a javascript or some other workaround for this?


author: Shannon S
body: Hi Lena,

Can you let me know what you're using instead of RGB? I tested with CMYK and I can confirm that this does not work, although I think that it may be because RGB is meant for web images and CMYK is meant for print, I can still report it as a bug in case this is not intentional.

As for resizing the image, you can, of course, choose small/medium/large as you would with the .jpg, but not specify a width in pixels.

I'm not familiar with javascript myself, but I was able to specify the size of the thumbnail using the [HTML Macro](https://confluence.atlassian.com/doc/html-macro-38273085.html). But note if you do this, the previous won't work in the same way, and it appears to be a .jpg version of the original .psd file.

Kind regards,

Shannon


author: Lotta Lilja
body: Hi!

I don't know what you mean by "using instead of RGB"? As I wrote previously, the .psd shows up on the page if it is saved with RGB, but it does not show up if it is saved with CMYK. So we get the same results, which is good. Sort of. :-) However, I wonder what exactly you did with the HTML macro to make it work with the seamless size change? I would like to try that, so can you please provide me with a detailed instruction?

Best,

Lena


author: Shannon S
body: Hi Lena,

That's what I meant; since you mentioned if you save as RGB it previews, and when you do not, it does not show up. I assumed you meant you were using CMYK instead. Thank you for confirming. I don't believe this is meant to work, but I will submit it as a request now.

With the HTML macro I used just a regular img source tag:

\<img src="url-to-image" width="xxx"\>

And it will display the .psd image (albeit as a .jpg and not the .psd preview that's built into Confluence) with the pixel width I specified. Due to the way this forces the image to be resized, however, the quality was poor, so I wouldn't recommend doing it this way and rather choose the small/medium/large option you get from Confluence.

Regards,

Shannon


author: Shannon S
body: Hi Lena,

Here's the case I just raised for CMYK preview not working:

* [CONFSERVER-54955](https://jira.atlassian.com/browse/CONFSERVER-54955)

Please feel free to vote on it to help show the number of users who have run into the issue, and comment there with your findings as well.

Kind regards,

Shannon


Tags: image

preview