Does there exist a data compression algorithm that uses a large dataset distributed with the encoder/decoder?
you're focused on images so will construct a scenario that fits your question in the affirmative. imagine certain images that are not compressed via lossy compression eg a non jpeg-like algorithm. imagine the images are not compressed and stored in a straight pixel format. next suppose there are images that are composed of sub images in a vertical fashion. eg imagine a stack of images composing a larger image:

A
B
C
D


in the above crude diagram A,B,C,D are stacked images that compose a larger image, say E. now suppose that one creates a file that is concatenating files/images A,B,C,D,E. on a standard "lossless" dictionary compression algorithm like lempel-ziv, the algorithm will be smart enough to use A,B,C,D as long dictionary strings, and compose E out of those strings. (this depends on specifics like maximal dictionary word size etc, but it could be made to work). so in this admittedly rather contrived scenario, the answer is YES.

however, you are missing something about JPEG, it is typically lossy compression, and also images are generally a 2d format, whereas a lot of compression algorithms take advantage of 1d patterns like long strings. so this lossiness combined with the 2d format will mean that general compression algorithms will not really save much over the cost to store the original images (which generally are already compressed anyway). 

therefore this is generally a negative answer overall, the overall idea of "compressing" using a "dictionary of images" is not really valid/possible/plausible and you can get a better idea of why by studying the mechanics/dynamics of compression algorithms in a more detailed way. on the other hand there are a wide variety of image compression algorithms that do in fact take advantage of redundancies in images. in JPEG for example the image is broken into squares and it can reuse common squares!