You're confusing physical media with file format. Popular image formats, like jpg, tiff, png, ..., will probably be supported for quite some time. There is no economic reason to change formats since companies don't own the various formats (there was some issue with jpeg, but haven't heard much about that lately; gif was killed by png when Compuserve started to make noise). If not, then you can convert the file format to something modern. Things that might not be supported are manufacturer specific formats like the various camera proprietary raw formats. However, there will be programs written by third parties that will deal with the old stuff like DCRAW which will convert almost any raw file to tiff, Nconvert which will convert a huge variety of image formats to another format, or ffmpeg which will convert a huge variety of video formats to another format. All the above programs are free programs that do more than most, perhaps all, payware programs.
Physical media like CD; DVD; Bluray; LaserDisc; 8", 5.25", 3.5" floppies; ST-506 interface hard drives are or will go out of style. Partially due to technical advances, creating new markets to obsolete your present equipment, and trying to prevent duplication (all duplication prevention techniques have failed so far). However, there is always a transition period where you can transfer the contents of unprotected media to a different format. I've done that with data on my 8", 5.25" and 3.5" floppies, optical drives, and old ST-506 hard drives.
I would worry more about your computer operating system becoming useless and won't support your camera specific raw file format because you can't run your old software on a newer OS.