I figured out how to do this!
First, go to your SharePoint list and click on the images stored there to view them in separate tab (doing this in PowerApps is the end goal). Now look at the URL in your browser for the image open in it's own tab. We need to be able to identify that URL within PowerApps and then use download("imageURL") or launch("imageURL"), they seem to do the same thing in this case. If you look at several images in your list you will find there is a pattern to the URLs. You can essentially break it into five pieces:
- The list's address
- The list item ID
- The column name
- The filename (Will look like gibberish if photo was added through PowerApps. if you enter it in lists it will retain the original filename.)
- The filetype
Example:
"https://ListAddress/Attachments/ItemID/Reserved_ImageAttachment_%5B5%5D_%5BColumnName%5D%5B36%5D_%5BFileName%5D%5B1%5D_%5B1%5DFileType"
Everything before the ItemID will be the same every time so just copy that part and store it in your app somewhere.
The ItemID can easily be found in PowerApps with "ThisItem.ID".
Everything from the ItemID to the FileName doesn't appear to change either so just copy and store that part too.
Store the section between FileName and FileType as well.
Getting the FileName is the trickiest part. Create a label and set the "Text" property to "ThisItem.ColumnName.Full". This will output a wall of text, but inside that wall is the FileName and FileType. I spent some time looking for patterns to determine how to slice the FileName out. Yours may be different but I'll share what I did (Label1 holds "ThisItem.ColumnName.Full").
In Label2's Text property I put "Left(Right(Label1.Text,(Len(Label1.Text) - (Find("6%25255d_%25255b",Label1.Text) + Len("6%25255d_%25255b")) + 1)),36)"
This outputs the FileName.
Next we get the FileType. This can also be pulled from our label containing "ThisItem.ColumnName.Full". Here is how I did it.
In Label5's Text property I put: "Right(Label1.Text,(Len(Label1.Text) - (Find("%25255d.",Label1.Text) + Len("%25255d.")-2)))"
In Label6's Text property I put: "Left(Label5.Text,Find("%2Fthumbnails%",Label5.Text)-1)"
This outputs the FileType.
Finally we put it all together in Label4:
"Concatenate("ListAddress/Attachments/",ThisItem.ID,"/Reserved_ImageAttachment_%5B5%5D_%5BColumnName%5D%5B36%5D_%5B",Label2.Text,"%5D%5B1%5D_%5B1%5D",Label6.Text)"
Now if you put launch(Label4.Text) into the OnSelect property of a button it will open your image in a new tab. Probably not the cleanest solution but it shows that it CAN be done.