I have found the best hats to be those with a wide brimmed front, with a removable flap in the back. Why? They don't interfere with your backpack. I often wear something like this. There is even a snap on it so you can pull it forward in front of your neck or face. It is NOT a wider brim, but the flap extends the shade coverage. Also can't be rolled - I just clip it to the outside of my pack when not in use. The flap on this hat is VERY light and doesn't heat up my neck like others do. Also removable.
There are also hats like these with all removable flaps - but I tend not to use mine often. But they are great when you really need to keep your face covered (I am a redhead who has had skin cancer already)
Alternatively - I always still carry a hat, but for days when it is hot, sunny, and not too windy - I also like a hiking umbrella with hands free attachments. Here is an article about hiking umbrellas - I have the gossamer gear on their list, but also have one from z-packs that is NOT on the list and I like them both. Also hear good things about the Euroschirm - but haven't tried that one. The advantage of an umbrella is it keeps you even more shaded and keeps you cooler, especially since you can skip the hat while using it if you position it correctly. And of course - are also great for rain.
Protect yourself from sun and rain on the trail with these 7 lightweight and durable hiking umbrellas. Learn about size, UV protection, materials, colors and types. Reviews for Montbell, EuroSCHIRM, Six Moon Designs, Helinox, S2S, Liteflex hiking Chrome umbrella. Also learn how to DIY a...
www.greenbelly.co
Also keep in mind - most Camino routes you are heading west and the sun is mostly behind you - so neck coverage is more important than face coverage. But again - depends on the route!