d2jsp
Log InRegister
d2jsp Forums > d2jsp > General Help > Site Suggestions >
Poll > Automatically Reject Oversized Profile Images > Personal Photo, Avatar, Signature
Closed New Topic New Poll
  Guests cannot view or vote in polls. Please register or login.
Member
Posts: 17,000
Joined: Oct 24 2010
Gold: 0.00
Warn: 30%
Oct 9 2019 07:18am
Almost every user on this site has or had at least one image in the profile, whether as an avatar, personal photo or as a signature
and went through the upload process.
In the example of a personal photo, it's saying All photos must be no larger than 100 kilobytes and no bigger than 192 px by 192 px.
However, nothing stops a user from uploading a photo with an arbitrary size, let's say 3 MB instead of the allowed 100 kilobytes - no checks are done here.

There are surely (some) members who see other users with inapprioprate images and report them, but if you could automatically reject oversized images
before they can even be uploaded and applied to the users profile, no reports would be needed at all (in terms of image size).
In addition, users as well as this site would save some energy and memory since oversized images cannot be uploaded and used.
What is more, both the d2jsp staff as well as we the members would not annoy each other for breaking this rule. Some people break this rule on purpose,
but there are definitely people who accidently break it because it might not be as obvious to see that there are limits in size. An automation would solve all these problems.


Additional stuff:
Here is an example in javascript (addon: Tampermonkey). If you know how to run these scripts, you can visit the link
inside it (https://imgur.com/ZxqVGwu) and run the script. It will print you the size of the image in kilobytes.

Code
// ==UserScript==
// @name New Userscript
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://imgur.com/ZxqVGwu
// @grant none
// ==/UserScript==

var req = new XMLHttpRequest();
req.open('HEAD', 'https://i.imgur.com/ZxqVGwu.png', true);
req.onreadystatechange = function(){
if (req.readyState == 4) {
if (req.status == 200) {
alert('Size: ' + req.getResponseHeader('Content-Length')/1000 + ' kilobytes');
}
}
};
req.send();


And then if image size greater than allowed size, reject upload.. :p

I see only one problem within the implementation: Due to the Same Origin Policy, this script will only work under the same origin.
I'm not that professional in javascript anyway but I couldn't find another way of getting the size of an image directly from this site.
You need to visit the site where the image has been uploaded in order to get the image size. But I can totally imagine that in case you are supporting this idea
and try to implement it, you will find a more efficient way of doing it... ^^

This post was edited by OnChair on Oct 9 2019 07:37am
Retired Moderator
Posts: 4,271
Joined: Dec 29 2017
Gold: 1,239.00
Trader: Trusted
Oct 9 2019 07:30am
In case of noticing profile violation, it can be sent to appropriate staff group: Members++. Solution similar to proposed works in case of profile background, and there is the following message displayed:

However, I will null vote here, and leave it for proper staff group to possibly tell something more here.
Member
Posts: 20,223
Joined: Apr 30 2008
Gold: 5,169.82
Oct 9 2019 08:52am
FYI, java script cannot be used to reject user input. It is easy for users to circumvent such scripts, and this website's backend is PHP.

Regardless, I vote yes.
Member
Posts: 17,000
Joined: Oct 24 2010
Gold: 0.00
Warn: 30%
Oct 10 2019 03:44am
Quote (icecool @ 9 Oct 2019 15:30)
In case of noticing profile violation, it can be sent to appropriate staff group: Members++. Solution similar to proposed works in case of profile background, and there is the following message displayed:
https://i.imgur.com/DSTMVVz.png
However, I will null vote here, and leave it for proper staff group to possibly tell something more here.


Oh right, I have totally forgotten that checks are made for the profile background. So it should be really easy and also reasonable to adapt these checks
for user avatar, personal photo and signature.

Quote (Leevee @ 9 Oct 2019 16:52)
FYI, java script cannot be used to reject user input. It is easy for users to circumvent such scripts, and this website's backend is PHP.

Regardless, I vote yes.


I rather meant to gather information (image size) with javascript but you are right of course I wasn't clear enough in my description :p
Not sure if that was a good attempt at all with javascript but that is my very first site suggestion and I thought there must be some sort
of example within a topic, and I couldn't find anything else :3

This post was edited by OnChair on Oct 10 2019 03:49am
Member
Posts: 122,810
Joined: May 2 2009
Gold: 19,149.06
Oct 10 2019 04:02am
there were checks for avatars until the avatar preview was added.

i would assume they dont care about checks anymore
Member
Posts: 18,406
Joined: Jan 27 2007
Gold: 495.00
Oct 10 2019 08:22pm
Quote (Cheetos @ Oct 10 2019 05:02am)
there were checks for avatars until the avatar preview was added.

i would assume they dont care about checks anymore



Only on the 1st and the 15th
Member
Posts: 17,000
Joined: Oct 24 2010
Gold: 0.00
Warn: 30%
Oct 14 2019 05:08am
(Bump)

I like to add that I have recently reported several users who either had an oversized avatar or personal picture
(even some people from the staff team). Also, I have observed that some users refused or simply ignored the report
and keep violating this rule. I don't like to repeat myself but the suggested check would prevent them from doing this,
and the responsible staff group would no longer need to deal with any of these reports and have more time doing
something else than (repeatedly) asking the affected users removing their oversized pictures.

Some more opinions from the staff team on that would be great, because this suggestion is rather more of their interest.

This post was edited by OnChair on Oct 14 2019 05:34am
Admin
Posts: 24,300
Joined: Sep 24 2002
Gold: 22,279.75
Trader: Trusted
Oct 14 2019 07:31am
It doesn't prevent them from doing it as you can upload a new picture over an old one on some sites bypassing any initial checks that are in place.

It's still best to report violations to the appropriate staff member. Thanks
Go Back To Site Suggestions Topic List
Closed New Topic New Poll