in reply to Imager support for PNG, JPEG and GIF on macOS Sonoma

The way to get the Homebrew-installed location of a given package is (here) brew --prefix giflib, which would avoid needing the "locate" stuff.