The file size of an image file does not really matter with regards to the amount of memory required for processing and displaying said image because raster image file formats usually store the image data in a compressed way. What does matter when processing and displaying an image is the actual image dimensions. And 5000px by 25000px is large - an image of that size uses up approximately 480MB of memory while being processed/displayed. Moreover, when embedding a raster image into a PDF document, the image is not necessarily embedded in a compressed way either. Thus embedding an image of this size may well result in a very large PDF document as well.