Frames are fetched from Smega Drive.

From About the Smega Drive:

1,625,013 frames and 33,003 subtitles have been smashed together into what might be the most important website on the entire Internet. We are proud to present to you The Smega-Drive, a complete archive of Red Dwarf screenshots, and meme maker to boot.

So, it works like this. We’ve based the indexing and the search system on the subtitles from the DVDs / Blu-Rays, so you can look for a quote (or a small part of a quote) and with any luck you will find the subtitle screen you need, along with previews of frames that that subtitle covers. Alternatively, you can use the episode browser.