allow to disable all pictures, avatars, logos, icons #2563

Closed
opened 2025-11-02 04:40:35 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @milahu on GitHub (Nov 23, 2018).

let me configure

[picture]
ENABLED = false

to produce 'HTML only' pages without any images
except images in code / issues / wiki

to enable only icons

[picture]
ENABLED = false
ENABLE_FAVICON = true
ENABLE_ICONS = true

Originally created by @milahu on GitHub (Nov 23, 2018). let me configure ``` [picture] ENABLED = false ``` to produce 'HTML only' pages without any images except images in code / issues / wiki to enable only icons ``` [picture] ENABLED = false ENABLE_FAVICON = true ENABLE_ICONS = true ```
GiteaMirror added the type/proposal label 2025-11-02 04:40:35 -06:00
Author
Owner

@adelowo commented on GitHub (Nov 23, 2018):

What is the use case for this? You can easily turn off images from your browser

@adelowo commented on GitHub (Nov 23, 2018): What is the use case for this? You can easily turn off images from your browser
Author
Owner

@milahu commented on GitHub (Nov 23, 2018):

What is the use case for this?

saving bandwidth and trolling my users who expect fancy websites

You can easily turn off images from your browser

i want the server to serve less images

ascii avatars could be done like this

html-ascii-art-chromium
... in chromium

html-ascii-art-firefox
... in firefox

looks like i triggered four CSS bugs : /

<html>
<style type="text/css">

.avatar,.tiny{
margin:10px;
float:left;
word-wrap:break-word;
white-space:pre-wrap;
letter-spacing:0;
word-spacing:0;
padding:0;
font-family:monospace;
overflow-y:hidden;
line-height:1;
}

.avatar{width:42px;height:42px;}
.a3x2{font-size:21px;}
.a4x3{font-size:14px;}
.a6x4{font-size:10.5px;}
.a9x6{font-size:7px;}

.tiny{width:36px;height:36px;}
.t3x2{font-size:18px;}
.t4x3{font-size:12px;}
.t6x4{font-size:9px;}
.t9x6{font-size:6px;}

</style>
<!-- random string -->
<!-- css bug? this should show exactly 4 lines, but i see more -->
<div class="avatar a9x6">avatarRXPNKE5N6CLEOSHHVP3LCPVHXXXXXXXXXXXXXXXXXXXXXXXXHIDETHIS</div>
<div class="tiny   t9x6">tinyX6RXPNKE5N6CLEOSHHVP3LCPVHXXXXXXXXXXXXXXXXXXXXXXXXHIDETHIS</div>

<!-- this will not render properly: -->
<div class="avatar a6x4">/****\|    ||   |\____/HIDETHIS</div>
<!-- ... cos white-space:pre-wrap does not break words -->
<!-- but this will: -->
<div class="avatar a6x4">/****\|&nbsp;&nbsp;&nbsp;&nbsp;||&nbsp;&nbsp;&nbsp;&nbsp;|\____/HIDETHIS</div>

<!-- hyphen / mdash is broken by chromium -->
<div class="avatar a4x3">+--+|&nbsp;&nbsp;|+--+HIDETHIS</div>
<!-- non breaking hypen is not, but will trigger firefox -->
<div class="avatar a4x3">+&#8209;&#8209;+|&nbsp;&nbsp;|+&#8209;&#8209;+HIDETHIS</div>
<!-- with html break tag -->
<div class="avatar a4x3">+--+<br/>|&nbsp;&nbsp;|<br/>+--+<br/>HIDETHIS</div>

<div class="avatar a3x2">3x23x2HIDETHIS</div>

</html>
@milahu commented on GitHub (Nov 23, 2018): > What is the use case for this? saving bandwidth and trolling my users who expect fancy websites > You can easily turn off images from your browser i want the server to serve less images ascii avatars could be done like this ![html-ascii-art-chromium](https://user-images.githubusercontent.com/12958815/48943931-17631d00-ef25-11e8-811d-3f538a17de5f.png) ... in chromium ![html-ascii-art-firefox](https://user-images.githubusercontent.com/12958815/48943942-1e8a2b00-ef25-11e8-830d-552e8b3b40ee.png) ... in firefox looks like i triggered four CSS bugs : / ``` <html> <style type="text/css"> .avatar,.tiny{ margin:10px; float:left; word-wrap:break-word; white-space:pre-wrap; letter-spacing:0; word-spacing:0; padding:0; font-family:monospace; overflow-y:hidden; line-height:1; } .avatar{width:42px;height:42px;} .a3x2{font-size:21px;} .a4x3{font-size:14px;} .a6x4{font-size:10.5px;} .a9x6{font-size:7px;} .tiny{width:36px;height:36px;} .t3x2{font-size:18px;} .t4x3{font-size:12px;} .t6x4{font-size:9px;} .t9x6{font-size:6px;} </style> <!-- random string --> <!-- css bug? this should show exactly 4 lines, but i see more --> <div class="avatar a9x6">avatarRXPNKE5N6CLEOSHHVP3LCPVHXXXXXXXXXXXXXXXXXXXXXXXXHIDETHIS</div> <div class="tiny t9x6">tinyX6RXPNKE5N6CLEOSHHVP3LCPVHXXXXXXXXXXXXXXXXXXXXXXXXHIDETHIS</div> <!-- this will not render properly: --> <div class="avatar a6x4">/****\| || |\____/HIDETHIS</div> <!-- ... cos white-space:pre-wrap does not break words --> <!-- but this will: --> <div class="avatar a6x4">/****\|&nbsp;&nbsp;&nbsp;&nbsp;||&nbsp;&nbsp;&nbsp;&nbsp;|\____/HIDETHIS</div> <!-- hyphen / mdash is broken by chromium --> <div class="avatar a4x3">+--+|&nbsp;&nbsp;|+--+HIDETHIS</div> <!-- non breaking hypen is not, but will trigger firefox --> <div class="avatar a4x3">+&#8209;&#8209;+|&nbsp;&nbsp;|+&#8209;&#8209;+HIDETHIS</div> <!-- with html break tag --> <div class="avatar a4x3">+--+<br/>|&nbsp;&nbsp;|<br/>+--+<br/>HIDETHIS</div> <div class="avatar a3x2">3x23x2HIDETHIS</div> </html> ```
Author
Owner

@wxiaoguang commented on GitHub (Apr 13, 2022):

It's not feasible, and it doesn't save that much as bandwidth as you thought because most images are cached.

And you can write your customized css and templates to do fancy work.

The HTML content takes the most bandwidth:

image

@wxiaoguang commented on GitHub (Apr 13, 2022): It's not feasible, and it doesn't save that much as bandwidth as you thought because most images are cached. And you can write your customized css and templates to do fancy work. The HTML content takes the most bandwidth: ![image](https://user-images.githubusercontent.com/2114189/163105350-ee4db7d5-ba3a-4ce2-8eb5-09de9ffc0e44.png)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2563