Skip to content

Commit 9d57b12

Browse files
committed
Updated README
1 parent 5c73551 commit 9d57b12

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

README.md

+18-1
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,23 @@ Limitations
304304

305305
This functionality allows you to efficiently sort favicon URLs by size and download only the favicons you need, making it a powerful tool for handling favicons in an optimised manner.
306306

307+
### Header & Hero Images
308+
309+
There are times where you would like to fetch the header or hero image from a URL. You can let FaviconFinder know that you want it to do this with the `acceptHeaderImage` parameter in the configuration.
310+
With the default value set to `false`, this parameter is an opt-in one.
311+
312+
You can use it as so:
313+
314+
```swift
315+
let favicon = try await FaviconFinder(
316+
url: url,
317+
configuration: .init(acceptHeaderImage: true)
318+
)
319+
.fetchFaviconURLs()
320+
.download()
321+
.largest()
322+
```
323+
307324
## Example Projects
308325

309326
To run the example project, clone the repo, and open the example Xcode Project in either the `iOSFaviconFinderExample`, or `macOSFaviconFinderExample`, depending on your build target.
@@ -329,7 +346,7 @@ To install it, simply add the dependency to your Package.Swift file:
329346
```swift
330347
...
331348
dependencies: [
332-
.package(url: "https://github.com/will-lumley/FaviconFinder.git", from: "5.1.2"),
349+
.package(url: "https://github.com/will-lumley/FaviconFinder.git", from: "5.1.4"),
333350
],
334351
targets: [
335352
.target( name: "YourTarget", dependencies: ["FaviconFinder"]),

0 commit comments

Comments
 (0)