While surfing the web I came across an article by Sam Lundquist at https://99designs.nl/ All credit goes to Sam on this one

You should use a JPEG when…
• You’re dealing with online photos and/or artwork. JPEGs offer you the most flexibility with raster editing and compression making them ideal for web images that need to be downloaded quickly.
• You want to print photos and/or artwork. At high resolution files with low compression, JPEGs are perfect for editing and then printing.
• You need to send a quick preview image to a client. JPEG images can be reduced to very small sizes making them great for emailing.

Don’t use a JPEG when…
• You need a web graphic with transparency. JPEGs do not have a transparency channel and must have a solid color background. GIF and PNG are your best options for transparency.
• You need a layered, editable image. JPEGs are a flat image format meaning that all edits are saved into one image layer and cannot be undone. Consider a PSD (Photoshop) file for a fully editable image.

You should use a GIF when…
• You want to create web animation. GIF images hold all of the animation frames and timing information in one single file. Image editors like Photoshop make it easy to create a short animation and export it as a GIF.
• You need transparency. GIF images have an “alpha channel” that can be transparent, so you can place your image on any colored background.
• You need a small file. The compression techniques in the GIF format allow image files to shrink tremendously. For very simple icons and web graphics, GIF is the best image file format.

Don’t use a GIF when…
• You need a photographic-quality image. Though GIFs can be high resolution, they have a limit of 256 colors (unless you know a few tricks). Photos typically have thousands of colors and will look flat and less vibrant (and sometimes weird due to color banding) when converted to GIF.
• You need to print an image. Because of the color limit, most printed photos will lack depth. If you need to print photos, look at TIFF, PSD and JPG.
• You need a layered, editable image. GIFs are a flat image format meaning that all edits are saved into one image layer and cannot be undone. Consider a PSD (Photoshop) file for a fully editable image.

You should use a PNG when…
• You need high-quality transparent web graphics. PNG images have a variable “alpha channel” that can have any degree of transparency (in contrast with GIFs that only have on/off transparency). Plus, with greater color depths, you’ll have a more vibrant image than you would with a GIF.
• You have illustrations with limited colors. Though any image will work, PNG files are best with a small color palette.
• You need a small file. PNG files can shrink to incredibly tiny sizes—especially images that are simple colors, shapes or text. This makes it the ideal image file type for web graphics.

Don’t use a PNG when…
• You’re working with photos or artwork. Thanks to PNGs’ high color depth, the format can easily handle high resolution photos. However, because it is a lossless web format, file sizes tend to get very large. If you’re working with photos on the web, go with JPEG.
• You’re dealing with a print project. PNG graphics are optimized for the screen. You can definitely print a PNG, but you’d be better off with a JPEG (lossy) or TIFF file.

You should use a TIFF when…
• You need high-quality print graphics. Along with RAW, TIFF files are among the highest quality graphic formats available. If you’re printing photos—especially at enormous sizes—use this format.
• You are making a high-quality scan. Using TIFF to scan your documents, photos and artwork will ensure that you have the best original file to work off of.

Don’t use at TIFF when…
• You’re working with web graphics. While many web browsers support it, TIFF files are optimized for print. Go with JPEG or PNG when you need to display high-quality images online.

You should use RAW when…
• You are shooting and editing photos. Make sure your camera is set to RAW so you can capture the most versatile image. Then, use a compatible photo-editing application to adjust your image.

Don’t use RAW when…
• You’re working with web graphics. RAW is built for photo editing. When you’re ready to present your photos for the web, convert them to JPEG.
• You’re ready to print your photos. Many printers won’t accept raw formats, so first convert to JPEG or TIFF.

You should use a PSD when…
• It’s time to retouch photos. Need to color correct a photo? Or add a layer of text? PSD = photos.
• You need to edit artwork for digital or print. That could be a photo, painting, drawing, or anything else. Photoshop is the right tool to make sure every line, shadow and texture is in place.
• You want digital images for the web like social media images, banner ads, email headers, videos etc. Creating these images in Photoshop will ensure they’re right size and optimized for the web.
• You have to create a website or app mockup. Layers make it easy to move UI elements around.
• You want to get fancy with animation and video. Photoshop makes it easy to cut together simple video clips and add graphics, filters, text, animation and more.

Don’t use a PSD when…
• You need to post a photo online or send a preview to a client. The web is JPEG friendly. Convert first to make sure your audience can see your image (and so it won’t take several minutes to download).
• You’re ready to print your photos. Many printers won’t accept the PSD format, so first convert to JPEG or TIFF.

You should use a PDF when…
• You’re ready to print. As we mentioned, many printers prefer PDF as their primary delivery format because it is so ubiquitous. Check with your printer to see how they’d like you to prepare your file.
• You want to display documents on the web. You wouldn’t use a PDF for a single icon or logo, but it’s great for posters, flyers, magazines and booklets. PDFs will keep your entire design in one package, making it easy to view, download or print.

Don’t use a PDF when…
• You need to edit your design. PDFs are great containers, but use other applications for the contents. You can edit raster images with Photoshop and vector graphics with Illustrator. When you’re done, you can combine those into a PDF for easy viewing.

You should use an EPS when…
• You need to send a vector logo to a client, designer or a printer. With an EPS file, you don’t have to worry about where the logo will be placed or printed. No matter the size, it will always appear at the correct resolution.

Don’t use an EPS when…
• You’re dealing with photographs or artwork. EPS can handle raster images, but this type of image file is primarily for vectors. Work with a PSD, TIF or JPEG when you have a photo project.
• You need to display an image online. Export to JPEG, PNG or GIF first.

You should use an AI when…
• You need to edit a vector design. AI files allow you to move and alter every single element in your design with just a click or two.
• You need to create a logo, icon or brand mascot. Every vector shape and line created in Illustrator can be blown up to any size, which makes it ideal for images that need to be used in many different ways.
• You want a one-page print piece. Illustrator is perfect for posters, business cards, flyers and notecards that can be combined with other raster images.
• You need to set type for a logo. Illustrator’s typesetting features are incredibly powerful, enabling any text to be stretched, skewed and transformed any way imaginable.

Don’t use an AI when…
• You need to edit images. If a raster image (photo or artwork) is being used in a composition, Illustrator has a limited number of tools to edit that image directly. Photoshop (PSD files) can make more comprehensive adjustments like color, contrast and brightness.