Skip to content
Snippets Groups Projects
Commit 648e8ba3 authored by Dominik Hebeler's avatar Dominik Hebeler
Browse files

fixed pixabay

parent facbc025
No related branches found
No related tags found
3 merge requests!2161Translated using Weblate (Spanish),!2152Development,!2151Resolve "Overhaul Imagesearch"
......@@ -3,6 +3,7 @@
namespace app\Models\parserSkripte;
use App\Http\Controllers\Pictureproxy;
use App\Models\DeepResults\Imagesearchdata;
use App\Models\Searchengine;
use App\Models\SearchengineConfiguration;
use Log;
......@@ -30,11 +31,11 @@ class Pixabay extends Searchengine
$results = $content->hits;
foreach ($results as $result) {
$title = $result->tags;
$link = $result->pageURL;
$title = $result->tags;
$link = $result->pageURL;
$anzeigeLink = $link;
$descr = "";
$image = Pictureproxy::generateUrl($result->previewURL);
$descr = "";
$image = Pictureproxy::generateUrl($result->previewURL);
$this->counter++;
$this->results[] = new \App\Models\Result(
$this->configuration->engineBoost,
......@@ -46,11 +47,7 @@ class Pixabay extends Searchengine
$this->configuration->infos->homepage,
$this->counter,
[
'image' => $image,
'imagedimensions' => [
"width" => $result->previewWidth,
"height" => $result->previewHeight
]
'image' => new Imagesearchdata($result->previewURL, $result->previewWidth, $result->previewHeight, $result->largeImageURL, $result->imageWidth, $result->imageHeight),
]
);
}
......
<link rel="preload" as="image" href="{{ $metager->getResults()[0]->image->image_proxy }}">
@if (sizeof($metager->getResults()) > 0)
<link rel="preload" as="image" href="{{ $metager->getResults()[0]->image->image_proxy }}">
@endif
<div class="image-container">
@foreach ($metager->getResults() as $index => $result)
@include('layouts.image_result', [
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment