I'm not sure there is a pure Visio fix for this issue. I tried a few macro ideas and didn't arrive at a solution just with Visio. I didn't try different sizes but I did try moving the elements around. It appears that the border is introduced by the text shape. If it sat away from the edge of the underlying photo then your result wouldn't include the extra white pixels.
I would recommend running a batch cropping function via a bitmap editor. Free tools such as Irfanview allow you to crop and/or convert a bunch of images in a standardised way. As an example, watch this video
Batch crop images using Irfanview - YouTube