While some image and photograph creators choose to license their works in such a way that attribution is not necessary, it is generally appreciated.
Ethics and best practice indicate that regardless of how an image is licensed, if you did not create it, it must be cited. It is inappropriate to represent someone else's work as your own.
When formatting images, look for ways to add citation information that are appropriate for your project:
Some, but not all. websites will include a link to either the photograph's metadata or may indicate a preferred citation format. If the citation info isn't obvious, try looking for links that read, "More details" or something similar.
Image citation generators should be used with caution. They can get you started with citation, but you must check output carefully. Sometimes generators miss key elements.
The more automated the citation generator (such as the only step being inputting a URL for an image), the less accurate it may be in harvesting all of the required citation elements.