This Forum has been archived

Visit the new Forums
Forums: Index Community Central Forum Resize thumbnails in image categories?
FANDOM's forums are a place for the community to help other members.
To contact staff directly or to report bugs, please use Special:Contact.

50px-Replacement filing cabinet.svg

Note: This topic has been unedited for 3679 days. It is considered archived - the discussion is over. Do not add to unless it really needs a response.

Simple question: is it possible to change the size of thumbnails in an image gallery here on Wikia? I found a file named "MediaWiki:Gadget-ResizeGalleries.js" that could be created, but I have no idea how it works. There must be a way! Thanks for your help. Klow 22:37, June 22, 2010 (UTC)

Yes, see Help:Gallery. Photo width: widths=[number of pixels] (default/empty = 120px). --Pcj (TC) 22:55, June 22, 2010 (UTC)
Somewhat related; how do you hide the "Add Photo" button from the gallery slideshow feature?- 5əb'7aŋk(7alk) 11:03, June 23, 2010 (UTC)
You would need to use CSS: .wikia-slideshow-addimage { display:none; }
Ah, sweet. Thank you!- 5əb'7aŋk(7alk) 11:13, June 23, 2010 (UTC)
Damn, I badly phrased my question. I actually meant resizing automatic galleries from any image category. Is that possible? (I rename the page) Klow 17:32, June 23, 2010 (UTC)
Not the ones auto-generated in the Category: namespace, but you could generate a facsimile using DPL where you could control the widths and redirect the category page. -- Fandyllic (talk · contr) 2:47 PM PST 23 Jun 2010
I have no idea what you are talking about. Klow 08:36, June 24, 2010 (UTC)
LOL, well it is kind of complicated. See Help:DynamicPageList. -- Fandyllic (talk · contr) 9:12 AM PST 24 Jun 2010
Could someone give me directions as to how to do that?... Klow 09:28, July 1, 2010 (UTC)
You can resize the width of the images in galleries on all category pages by adding something to your site MediaWiki:Common.css. This will only affect namespace 14 (the category namespace):
/*** Category Pages (width adjustments for galleries) ***/

/*Width of each column in the gallery*/
body.ns-14 #wikia_page td {
    width:170px !important;
body.ns-14 div.gallerybox {
    width:160px !important;
/*Width of the thumbnail around each image*/
body.ns-14 div.gallerybox div.thumb {
    width:160px !important;
body.ns-14 div.thumb div {
    width:150px !important;
/* Width of the images */
body.ns-14 div.thumb div a img {
    height:auto !important;
    width:140px !important;
I tested these widths to fit around the Ogg player buttons on category pages, but you can change the widths to be whatever you want. Keep in mind that if you make them too large they will go off the side of the page for people with smaller monitors. If you do change the width, I recommend you keep the same ratio I have in this example- about 10px between each level. Gardimuer { ʈalk } 19:15, July 1, 2010 (UTC)

I tested it, but it does not seem to generate new thumbnails, it just enlarges the original 120px ones, which makes them blurry. Is that normal?... Klow 10:26, July 8, 2010 (UTC)

Yes, that is the expected behavior for that CSS code. There is no way through CSS to create actual larger thumbnails. --Pcj (TC) 14:55, July 8, 2010 (UTC)
Community content is available under CC-BY-SA unless otherwise noted.