I assume you are talking about Workbench when you say "select a file"?
What version of AmigaOS are you using?
With OS 3.9, go to SYS:Prefs/DefIcons, search for "JPEG", doublecklick the entry. An icon information window pops up. Change the "Default Tool" to "
/Aweb".
Note that AWeb (or any other web browser) are a bad choice if you just need a picture viewer. Try VT or Visage (Aminet) instead.
With OS 3.5, download DefIcons44 from Aminet. After installing it, follow the instructions for OS 3.9.
If you're using an older Version of AmigaOS, you're pretty much out of luck. Your only option would be to install a Workbench replacement. Either Scalos (looks and feels like Workbench, just way more powerful) or Directory Opus Magellan (a classic file manager on steroids, extremely powerful but somewhat complicated to setup).