'https://saucenao.com/search.php?url=' . url_escape(make_http($image->get_thumb_link())), 'TinEye' => 'https://www.tineye.com/search/?url=' . url_escape(make_http($image->get_thumb_link())), 'trace.moe' => 'https://trace.moe/?auto&url=' . url_escape(make_http($image->get_thumb_link())), 'ascii2d' => 'https://ascii2d.net/search/url/' . url_escape(make_http($image->get_thumb_link())), 'Yandex' => 'https://yandex.com/images/search?rpt=imageview&url=' . url_escape(make_http($image->get_thumb_link())) ]; // only generate links for enabled reverse search services $enabled_services = $config->get_array(ReverseSearchLinksConfig::ENABLED_SERVICES); $html = ""; foreach ($links as $name => $link) { if (in_array($name, $enabled_services)) { $icon_link = make_link("/ext/reverse_search_links/icons/" . strtolower($name) . ".ico"); $html .= "$name icon"; } } $page->add_block(new Block("Reverse Image Search", $html, "main", 20)); } }