Adds table of contents and resizes image