Resize jpg files and embed the code to a rst file