When you refer to trying to flash the firmware obtained from multiple sources, that is something of a vague reference. The issue being if you're stuck in this bootloop only into Recovery Mode or Download Mode after flashing the stock ROM, that's an indicator it was the wrong ROM. When a different ROM than what's required was used, that creates a situation where your phone has no working Android operating system to boot into so all it can do is boot up into Recovery or Download mode. That's at least an indicator that your phone isn't hard bricked and at that point for the most part dead. Flash it again using an appropriate, matching ROM should restore your phone to working condition once more.
Keep in mind that there are multiple variations of your S7 Edge, with differences in each variation involving a mix of hardware (internal components) and/or software (ROMs, also referred to as firmware). So the ROM for a SM-935F phone may or may not have any or little compatibility with a SM-935A phone, there's a lot of variables to account for. So just to confirm, I'd suggest you re-download the appropriate ROM that exactly matches your particular S7 Edge. It's vital to select the ROM that matches the model, country, and carrier, ROMs are not interchangeable.
https://www.sammobile.com/firmwares/
Even if you did previously select the correct ROM, perhaps the problem is due to the file itself was corrupted during the download process. But whatever the case, try re-flashing again. And do save the Odin utility log file that's displayed, there's a lot of relevant info in it.
Even if this isn't a ROM issue though, there are lots of other factors to take into consideration. Which version of the Odin utility are you using?
https://odindownload.com/
Have you tried connecting your phone to your PC using a different USB cable? If you're plugging it into a USB hub or similar pass-through device, try plugging directly into a USB port on your PC.
As a side note, since you were attempting to root your phone due to some lost photos, just be wary and very selective about which file recovery utility you opt to use if you do try to root your phone again. Most are just smoke-and-mirrors effective about actually being able to restore deleted files, basing their claims of success on how easy it was to actually do this with unencrypted storage media. Since Marshmallow, all Android devices have encrypted internal media so when remotely using third-party utilities running on a non-native OS it's not the same environment.