Why are avatars being automatically resized?

Get help with installation and running phpBB 3.1.x here. Please do not post bug reports, feature requests, or extension related questions here.
Scam Warning
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

NOTE: phpBB 3.1.x is at its End of Life stage and support will NOT be provided after July 1st, 2018.
Bruce Banner
Registered User
Posts: 897
Joined: Thu Sep 25, 2014 10:36 am

Why are avatars being automatically resized?

Post by Bruce Banner »

My avatar appears normal in my UCP, but in a thread it's about 25% smaller.
Bruce Banner
Registered User
Posts: 897
Joined: Thu Sep 25, 2014 10:36 am

Re: Why are avatars being automatically resized?

Post by Bruce Banner »

Bump.
User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Re: Why are avatars being automatically resized?

Post by A_Jelly_Doughnut »

The postbit now has a max-width parameter on images in the css.

From content.css:

Code: Select all

.postprofile .avatar img {
    display: block;
    height: auto !important;
    max-width: 100%;
}
If you remove the max-width directive, the avatars should be restored -- but might run over the edge of the container div. Looks like the prosilver postbit width calculates to 175 px -- anything larger than that would be shrunken.

(This change is note tested.)
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish
Bruce Banner
Registered User
Posts: 897
Joined: Thu Sep 25, 2014 10:36 am

Re: Why are avatars being automatically resized?

Post by Bruce Banner »

A_Jelly_Doughnut wrote:The postbit now has a max-width parameter on images in the css.

From content.css:

Code: Select all

.postprofile .avatar img {
    display: block;
    height: auto !important;
    max-width: 100%;
}
If you remove the max-width directive, the avatars should be restored -- but might run over the edge of the container div. Looks like the prosilver postbit width calculates to 175 px -- anything larger than that would be shrunken.

(This change is note tested.)
Great, thanks. I've been testing, and I see that signature images, and also images in posts, also get resized. How do I change that?
Bruce Banner
Registered User
Posts: 897
Joined: Thu Sep 25, 2014 10:36 am

Re: Why are avatars being automatically resized?

Post by Bruce Banner »

Bruce Banner wrote:
A_Jelly_Doughnut wrote:The postbit now has a max-width parameter on images in the css.

From content.css:

Code: Select all

.postprofile .avatar img {
    display: block;
    height: auto !important;
    max-width: 100%;
}
If you remove the max-width directive, the avatars should be restored -- but might run over the edge of the container div. Looks like the prosilver postbit width calculates to 175 px -- anything larger than that would be shrunken.

(This change is note tested.)
Great, thanks. I've been testing, and I see that signature images, and also images in posts, also get resized. How do I change that?
EDIT: I tried editing the code as you said, but although the avatar was enlarged, the right half of it was cut off. What do I need to change to stop any images, avatars or sigs or post images, from being automatically resized or partially cut off on post pages or profile pages or in private messages or anywhere?

EDIT: That was supposed to be an edit, not another post. I clicked quote by mistake. I've managed to get the full avatar visible, but now the text of my posts is overlapping with my avatar. What do I need to do about this? I just want the board to appear normal, but I don't want images resized or cut off.
Bruce Banner
Registered User
Posts: 897
Joined: Thu Sep 25, 2014 10:36 am

Re: Why are avatars being automatically resized?

Post by Bruce Banner »

Bump.
User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Re: Why are avatars being automatically resized?

Post by A_Jelly_Doughnut »

Bruce Banner wrote: EDIT: I tried editing the code as you said, but although the avatar was enlarged, the right half of it was cut off. What do I need to change to stop any images, avatars or sigs or post images, from being automatically resized or partially cut off on post pages or profile pages or in private messages or anywhere?
You're basically asking for the impossible. If someone posts an 8mp image directly from their iPhone's camera, you can't display it on the screen at full scale. phpBB 3.0 cut it off, only showing you 1/8 of the image, phpBB 3.1 tells the browser to autoscale it to fit on the screen because the old behaviour caused numerous complaints.

The avatars can be handled by making the postbit wider.
Both segments from content.css:
.postprofile {
margin: 5px 0px 10px;
min-height: 80px;
border-style: solid;
border-color: transparent;
-moz-border-top-colors: none;
-moz-border-right-colors: none;
-moz-border-bottom-colors: none;
-moz-border-left-colors: none;
border-image: none;
border-width: 0px 0px 0px 1px;
width: 22%;
float: right;
display: inline;
}
.postbody {
padding: 0px;
line-height: 1.48em;
width: 76%;
float: left;
position: relative;
}
You must change both of these widths or the postbit will overlap the content, and the two widths must add to 99% or less.

The signature and post-embedded images don't have a real solution, as I explained above.
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish
User avatar
Lumpy Burgertushie
Registered User
Posts: 68553
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Why are avatars being automatically resized?

Post by Lumpy Burgertushie »

sometimes you just have to set rules and expect your members to follow them.

explain the limits on image sizes and tell them to adjust them before they upload or link to them etc.

if they do not follow your rules then you get to decide what to do about that.

robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
Bruce Banner
Registered User
Posts: 897
Joined: Thu Sep 25, 2014 10:36 am

Re: Why are avatars being automatically resized?

Post by Bruce Banner »

A_Jelly_Doughnut wrote:
Bruce Banner wrote: EDIT: I tried editing the code as you said, but although the avatar was enlarged, the right half of it was cut off. What do I need to change to stop any images, avatars or sigs or post images, from being automatically resized or partially cut off on post pages or profile pages or in private messages or anywhere?
You're basically asking for the impossible. If someone posts an 8mp image directly from their iPhone's camera, you can't display it on the screen at full scale. phpBB 3.0 cut it off, only showing you 1/8 of the image, phpBB 3.1 tells the browser to autoscale it to fit on the screen because the old behaviour caused numerous complaints.

The avatars can be handled by making the postbit wider.
Both segments from content.css:
.postprofile {
margin: 5px 0px 10px;
min-height: 80px;
border-style: solid;
border-color: transparent;
-moz-border-top-colors: none;
-moz-border-right-colors: none;
-moz-border-bottom-colors: none;
-moz-border-left-colors: none;
border-image: none;
border-width: 0px 0px 0px 1px;
width: 22%;
float: right;
display: inline;
}
.postbody {
padding: 0px;
line-height: 1.48em;
width: 76%;
float: left;
position: relative;
}
You must change both of these widths or the postbit will overlap the content, and the two widths must add to 99% or less.

The signature and post-embedded images don't have a real solution, as I explained above.
Great, thanks. Why 99% or less though? What happens if they add to 100%?
Bruce Banner
Registered User
Posts: 897
Joined: Thu Sep 25, 2014 10:36 am

Re: Why are avatars being automatically resized?

Post by Bruce Banner »

Lumpy Burgertushie wrote:sometimes you just have to set rules and expect your members to follow them.

explain the limits on image sizes and tell them to adjust them before they upload or link to them etc.

if they do not follow your rules then you get to decide what to do about that.

robert
Yeah, that's what I was hoping to do. But thought I'd be completely free to set my own. Didn't think there would be any unchangeable restrictions in the software. In case Jelly doesn't see my last post, do you know why those widths can't add up to 100%?
User avatar
Lumpy Burgertushie
Registered User
Posts: 68553
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Why are avatars being automatically resized?

Post by Lumpy Burgertushie »

it is not an unchangeable restriction, it is simply how it needs to work . you can make whatever changes you would like on your board to make it do whatever you want. however, for it to work the way it is designed, some things have to be done a certain way to work for the most people etc.

the 99% deal I am sure is just about leaving a bit of space for basic overhead.



robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Re: Why are avatars being automatically resized?

Post by A_Jelly_Doughnut »

There is 1px dedicated to the border between the postbit and the post content -- if they add up to 100% and you add the 1px border, some browsers will add a horizontal scrollbar.
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish
User avatar
Mick
Support Team Member
Support Team Member
Posts: 23055
Joined: Fri Aug 29, 2008 9:49 am

Re: Why are avatars being automatically resized?

Post by Mick »

Bruce Banner wrote:do you know why those widths can't add up to 100%?
You have to take the 'borders' in to account as well as the space allowed for the image.

Edit: too late again! :)
"The more connected we get the more alone we become" - Kyle Broflovski©
Bruce Banner
Registered User
Posts: 897
Joined: Thu Sep 25, 2014 10:36 am

Re: Why are avatars being automatically resized?

Post by Bruce Banner »

Lumpy Burgertushie wrote:it is not an unchangeable restriction, it is simply how it needs to work . you can make whatever changes you would like on your board to make it do whatever you want. however, for it to work the way it is designed, some things have to be done a certain way to work for the most people etc.

the 99% deal I am sure is just about leaving a bit of space for basic overhead.



robert
Great, thanks. What made me think it was an unchangeable restriction was when Jelly said I was asking for the impossible, and although the avatar restriction could be changed in content.css, there were no solutions to signature or post embedded images.
User avatar
Lumpy Burgertushie
Registered User
Posts: 68553
Joined: Mon May 02, 2005 3:11 am
Contact:

Re: Why are avatars being automatically resized?

Post by Lumpy Burgertushie »

well, jelly knows a lot more about this that I do, however, I always say that nothing is impossible, it just depends on how much you want to rewrite the code to make it do something it wasn't designed to do.


robert
I'm baaaaaccckkkk. still doing work on donation basis. PM your needs.

Premium phpBB 3.3 Styles by PlanetStyles.net

I am pleased to announce that I have completed the first item on my bucket list. I have the bucket.
Locked

Return to “[3.1.x] Support Forum”