Filter messages by files
Go to the chat details, hover your mouse over the filters in the upper left of the screen (the Everything filter is selected by default), and select the Files filter. The list of messages that are part of the related chat will be updated and only messages containing attachment(s) will be shown.
info_outline Note that an embedded image (via markdown) is not counted as an attachment. It is actually just a link to an image.