A right-click solution can also be nice in that it is faster and works also if you are off line.
No desktop environment was specified in the original question, so this answer will also be generic. Several file managers allow to define custom actions, which then can be executed by right-clicking the file.
A basic script to convert a PDF to jpg can be a one liner using one of several tools available. Using imagemagicks convert for example:
convert input.pdf output.jpg
will convert input.pdf into one or multiple jpeg files, sequentually numbered in the latter case.
Then it will depend on the file browser how this command can be incorporated into a script, and what placeholders need to be given to have input.pdf automatically substituted by the actual file name. For the default filemanager of Ubuntu 18.04, a how-to about adding your own script is provided here. A more powerful option that is not officially supported by the nautilus developpers, is provided by filemanager-actions. Users of Thunar can start here.