The below instruction are for switching to using the KDE file picker when attaching files in Firefox under Linux Mint 22. The KDE file picker or file chooser has a different set of capabilities than the standard GNOME file picker. One of these differences is it has a adjustable image preview view which means you can see a larger or smaller version of an image you are previewing.
1. Open a terminal, you can do this via going to the Mint icon in the lower left corner, and entering terminal into the search box, then click the terminal icon that appears.
2. Copy and paste the line below, then hit enter, and enter your login password when prompted. This installed the needed packages for the KDE file picker.
sudo apt-get install kio-extras xdg-desktop-portal-kde xdg-desktop-portal qt5-image-formats-plugins
3. Once the software is installed copy and paste the following line, then hit enter, to make the needed changes to use the KDE file picker:
sudo sed -i 's+gtk+kde+g' /usr/share/xdg-desktop-portal/x-cinnamon-portals.conf
4. Copy the below line and hit enter to set firefox to utilize the KDE file picker:
sudo sed -i 's+Exec=firefox %u+Exec=/usr/bin/sh -c "GTK_USE_PORTAL=1 firefox %u"+g' /usr/share/applications/firefox.desktop
5. To be able to utilize the KDE file picker without restarting the computer copy and paste the below line, then hit enter.
systemctl restart --user xdg-desktop-portal
You should now be all set. If Firefox is open, close it, then open it again. You should now be able to login to your email and click the attach button.
To display the image preview panel select the Options button in the top right corner of the attachment window and select Show Preview Panel as shown below:
You can also adjust the size of the icons, increase the preview window image size, and switch to icons view mode for larger thumbnails using the options shown below: