You don't mean file at all. FPGAs can't access files.
If your FPGA need access to the whole image, the best approach would probably be to store the image pixels in the FPGA block memory (using logic gates for that would be expensive). How you ge the image into the block memory is down to whatever chip is connected to your FPGA. The img_gry array that you show in your question could be stored as is in an FPGA block memory.