Skip to content

Customizing Image Search Providers

neobooru edited this page Aug 26, 2021 · 3 revisions

Warning: the following modification is 'unsupported' and requires you to either understand how to create a local docker image, or how to manually deploy szurubooru. Aka, this is only for advanced users.


All posts have a Search on ... in their sidebar. This allows you to search for the current post on other boorus. By default szurubooru allows you to search for similar posts on IQDB, Danbooru and Google Images.

It currently is not possible to edit these providers in an easy way. It however is possible to change the providers by editing the client source code.

Open the file client/html/post_readonly_sidebar.tpl and search for <section class='search'>, this should be around line number 56.

By default the section will look like this:

<section class='search'>
    Search on
    <a href='http://iqdb.org/?url=<%- encodeURIComponent(ctx.post.fullContentUrl) %>'>IQDB</a> &middot;
    <a href='https://danbooru.donmai.us/posts?tags=md5:<%- ctx.post.checksumMD5 %>'>Danbooru</a> &middot;
    <a href='https://www.google.com/searchbyimage?&image_url=<%- encodeURIComponent(ctx.post.fullContentUrl) %>'>Google Images</a>
</section>

You can add or remove as many links as you want. For example, if you want replace the default providers with Yandex and SauceNAO then the section will look like this:

<section class='search'>
    Search on
    <a href='https://yandex.com/images/search?rpt=imageview&url=<%- encodeURIComponent(ctx.post.fullContentUrl) %>'>Yandex</a> &middot;
    <a href='https://saucenao.com/search.php?url=<%- encodeURIComponent(ctx.post.fullContentUrl) %>'>SauceNAO</a>
</section>

Instead of ctx.post.checksumMD5 you can also use ctx.post.checksumSHA1 if you need the SHA1.

After making your changes make sure to either rebuild your local docker szurubooru/client image, or run npm run build when you are not using docker.