cleanup
This commit is contained in:
parent
3d47c80446
commit
49f613ddeb
15 changed files with 98 additions and 234 deletions
|
@ -68,13 +68,15 @@ func PerformBingImageSearch(query, safe, lang string, page int) ([]ImageSearchRe
|
|||
mediaURL, ok := data["murl"].(string)
|
||||
if ok {
|
||||
// Apply the image proxy
|
||||
proxiedURL := "/imgproxy?url=" + mediaURL
|
||||
proxiedFullURL := "/imgproxy?url=" + imgSrc
|
||||
proxiedThumbURL := "/imgproxy?url=" + mediaURL
|
||||
results = append(results, ImageSearchResult{
|
||||
Thumbnail: imgSrc,
|
||||
Thumb: imgSrc,
|
||||
Title: strings.TrimSpace(title),
|
||||
Media: mediaURL,
|
||||
Full: imgSrc,
|
||||
Source: mediaURL,
|
||||
ThumbProxy: proxiedURL, // Use the proxied URL
|
||||
ProxyFull: proxiedFullURL, // Proxied full-size image URL
|
||||
ProxyThumb: proxiedThumbURL, // Proxied thumbnail URL
|
||||
Width: width,
|
||||
Height: height,
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue