Do you really need two libraries or do you just want to display images from a diven document library in a gallery view?
If you are in SharePoint Online, there is a prebuild "Image Gallery" Webpart that you can configure to feed it's content from a document library in the site.
If you for other reasons need two document libraries (A general one and and image one), then you could create a flow on the general document library that
1) Triggers on file created or updated
2) Checks, if the filename ends with ".png",".jpg"...
3) And then copies that file to the image library