Thank you for responding, unfortunately, that article doesn't address the problem. Most of that article's text seems to be from an earlier version of ArcGIS Online where you couldn't have images automatically display as a thumbnail in popups at all without that workaround. But that's not the issue I'm having, since popups in the current version of ArcGIS should support gallery view of attachments . If I try and use that workaround, I get the same issue with layers I append to the web map. The issue isn't that I can't have images as thumbnails at all, it's that something is transformed in the attachments in the process of appending one layer to another, that makes the WebMap viewer not recognize them as images.
I contacted ESRI support and after a while I came across someone who was able to identify what I was talking about. So for anyone else with this problem, the issue is BUG-000157511 in ArcGIS online.
I was able to get a workaround by downgrading to an earlier version of Arcgis Pro. Allegedly the bug has since been fixed but I haven't upgraded to the most recent version to check yet.