I made some images in photoshop with simple shapes and colours so they were best suited to be saved as a png file rather than a jpg file and when I compared them to each other the png was a smaller file size than the jpg version. However when I swapped the jpgs for png files in Indesign and exported as a pdf the file size has become much larger and I dont know why. The jpg and pdf files have the same amount of pixels, maybe its the fact you cant compress the png in export stage? Any help is appreciated. thanks
InDesign takes the incoming pixels as they are and the amount of exported compression depends on your preset's Compression settings. So basically it is counter productive to place compressed formats because they are going to get re compressed on export to the export settings.
If you use Photoshop, use PSD, not PNG.
If you use Photoshop with text or vector layers use PDF or PDP, not PNG.