Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to fix broken PDF preview thumbnail?

Here's the situation:

When a PDF file is uploaded to Confluence Server using using the 'Insert files and images' tool in edit mode, the normal outcome is a thumbnail preview of the PDF on the page.

However, this may fail using Confluence Server out of the box because of insufficient memory allocated to Java. Failure results in a placeholder being shown where normally one would see the PDF preview.

This post presumes that the memory allocation problem has already been solved. Now uploaded PDFs preview normally. However, a PDF that has previously failed to be processed for the preview will continue to be shown with the placeholder icon, even when it is removed from the page and reattached.

In testing, we've even gone so far as to restart the server after removing the file, changing the file name, and then attaching it to a different page. Still it appears with the placeholder icon first allocated to it when its thumbnail processing failed.

So, how does Confluence Server recognise the file is one that it has seen before, and how can thumbnail processing be forced? For example, is there a specific hook in the database that needs to be removed?

1 answer

0 votes

I am not sure of how Confluence actually handles the previews, but I do know it litters your installation with thumbnail previews, and I think (but I am not sure) that the thumbnails are done by page, not by file.  So I suspect your page is creating a thumbnail, then when you change things, it's just falling back on the one it has cached!

I don't have an active server (with attachments) to hand, so I can't confirm where I see these, but I suspect you might be able to fix this by moving the files (or, better, only the offending ones that need regeneration) from <confluence home>/thumbnails

Note that this is not a directory that we include in backups when we're trying to take faster ones - Confluence does not strictly need the files in there to work, but it will be a bit slower if it has to regenerate them when pages need them.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Confluence

Confluence Mythbusters: Does Atlassian even use Confluence?

Hi, Confluence collaborators! As part of #Confluence-Collaboratory month, we’ve created a very special Mythsbusters segment, where we're dive into an interesting myth and uncover the truth behind i...

1,448 views 7 29
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you