# Replace Thumbnails and Theme Switching ♦

**URL:** <https://discourse.mozilla.org/t/replace-thumbnails-and-theme-switching/71697>\
**Category:** Development\
**Tags:** webextensions-api\
**Created:** [December 5, 2020, 3:29pm UTC](https://discourse.mozilla.org/t/replace-thumbnails-and-theme-switching/71697 "2020-12-05T15:29:27Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NumberOfContacts](https://sea1.discourse-cdn.com/flex001/user_avatar/discourse.mozilla.org/numberofcontacts/32/37226_2.png) [@NumberOfContacts](https://discourse.mozilla.org/u/NumberOfContacts)\
**Post date:** [December 5, 2020, 3:29pm UTC](https://discourse.mozilla.org/t/replace-thumbnails-and-theme-switching/71697/1 "2020-12-05T15:29:27Z")

</div>

[Advice Request]

Hi,

I am currently making an extension, and I hope I could get some  
practical advice on feasibility :

I want my extension to go fetch/load a local folder of custom homescreen  
thumbnails(top-sites), and then replace the auto-generated thumbnails in  
the homescreen with those it loaded.  
The extension would be able to read the associated domain names of the  
thumbnails and then replace them accordingly (e.g :  
Pinned Url : [youtube.com/anything](http://youtube.com/anything) : Ok so it’s YouTube : then  
replace the thumbnail with “Custom\_Youtube\_Thumbnail.png”)

Does that seems possible to you ? (Before I dive in head first)  
I saw that the top-sites API is not quite available  
[https://bugzilla.mozilla.org/show\_bug.cgi?id=1246693](https://bugzilla.mozilla.org/show_bug.cgi?id=1246693) but maybe I’m wrong.

Extra : My extension is switching themes (like this :  
[https://github.com/mdn/webextensions-examples/tree/master/theme-switcher](https://github.com/mdn/webextensions-examples/tree/master/theme-switcher) ).  
Would it be possible to switch the thumbnails accordingly  
(Custom\_Youtube\_Thumbnail\_light.png \> Custom\_Youtube\_Thumbnail\_dark.png)  
as i’ve made a version for each.

Would be a pleasure to hear your opinion on this, or just pointing  
useful resources to me,  
I’m not asking for a perfectly baked solution.  
Hope I’ve been concise.  
Thanks for reading me !

[End of Advice Request]
