Why are images tagged "size-medium" in CSS displaying at full size?

  • Author
    Posts
  • #1451853

    Okay! Portrait oriented images have been fixed!

    Think of the medium and large sizes on the Settings > Media page as a bounding box. Images will try to be the largest they can be within the constraints of the box. So, if you set medium to 500 x 500, then a portrait image would be 500px tall and a width relative to the aspect ratio of the original image. If the image were landcape, then it would be 500px wide instead.

    We probably won’t install a way to search for size-medium, but what I’ve asked for is a tool where staff can do a one time (irreversible) update to a blog to strip out *all* of the size-medium class names at once. No word on it yet, but I’ll keep you posted.

    #1451855

    musicdoc1
    Member

    Think of the medium and large sizes on the Settings > Media page as a bounding box. Images will try to be the largest they can be within the constraints of the box. So, if you set medium to 500 x 500, then a portrait image would be 500px tall and a width relative to the aspect ratio of the original image. If the image were landcape, then it would be 500px wide instead.

    I’m not sure I understand what you’ve said or how that’s a change.
    First of all, what’s the difference between a portrait and a landscape image. I think I know what you mean, but I want to be sure as I’ve never heard of these terms, never heard of this distinction, though I’ve handled tens of thousands of images with WP image loading and editing tools over the past five years.

    Second, how is this “fix” different than what I said was happening previously in my Sep 24, 2013, 12:53 PM post, earlier today? Admittedly I again made some typos, and it came out a bit garbled. Here’s what I meant to say:

    It appears that the square images with file sizes over the maximum setting for “Medium Size” on my Media Settings page are probably displaying at exactly 450 X 450. However, with a width of equal to or greater than the max (450 in this case) and a height of anything other than the max, above or below, the displayed height will be such that the ratio between the width and the height of the original file size is maintained.

    Third, does this “fix” address the following issue:
    When the width is below the Media Setting maximum for medium images a significant problem arises. Presently for images below the maximum, the height appears to be unrestricted. For example, if the maximum width is 450 pixels, an image having dimensions of 449 X 2, 449 X 451, or 449 X 2,002 would all display at the file size. Tall, thin images are, or were, slipping through last time I checked (several hours ago).

    #1451856

    musicdoc1
    Member

    Okay, I’ve seen an example of the “fix” you’ve described at http://songbook1.wordpress.com/?page_id=104114&preview=true, a page I’ve previously brought attention to on this thread. I presume a portrait image is one with the height greater than the width, while an landscape image has a width greater than the height. If that’s the case, then the fix addresses and corrects the last issue I mentioned just above, the problem of tall and thin (or short and fat I should have added) images displaying at file size.

    The bigger issue for me is the one we’re both still waiting on. In the mean time I will resume the slow process of manual removal of the troublesome “size-medium” tags.

    Thanks designsimply for your continued efforts. Your patient assistance in explicating and resolving this matter is greatly appreciated. : -)

    #1451857

    musicdoc1
    Member

    Regarding the “fix” you mention. Sorry, but I’m going to have to modify my commendation of it.

    The fix is an improvement, or may be considered an improvement, but it doesn’t really resolve the issues I’ve been dealing with. Although it eliminates the unlimited height issue I pointed out above, it only modifies the display height so that it always falls within the maximum set for a size range (small, medium, or large). It does nothing about the following issues, which are the ones which propelled me to begin this thread and remain so:

    1. Allowing the user-chosen width and height settings to determine the display size of an image. User-chosen width and height settings should override the default generic size range (thumbnail, medium, large, full, etc.) necessarily applied when an image is uploaded.

    The image <img class=”size-medium wp-image-106843 alignright” title=”Einar Swan with members of the Vincent Lopez Orchestra saxophone section, 1926″ alt=”Einar Swan-1926-with-members-of-Vincent-Lopez-Sax-Section-c1-d40″ src=”http://songbook1.files.wordpress.com/2013/02/einar-swan-1926-with-members-of-vincent-lopez-sax-section-c1-d40.jpg?w=94″ width=”108″ height=”349″ />
    was manually set to display at 108 pixels in width by 349 pixels in height (108 X 349). Prior to the present “fix” it displayed at the file size of 400 w X 1264 h. Now, after the fix it should have a height approximately equal to 400 times 450 divided by 1264, or ~ 142 pixels. So its present dimension are about 142 X 450.

    What’s wrong with that? Well, for one thing it’s about 30% off the dimensions I set and saw displayed before WP decided to make the CSS tag “size-medium” override my settings. Obviously, an image suddenly displayed at modified dimensions other than those I’ve chosen might and often does upset my page or post design in various ways. I typically choose a certain width and height for specific reasons. I may want the image to stop at the end a certain paragraph. I may have to avoid running text into something in the background. This last is an ever-present issue on my site because of the two-tone custom background. I may want the text to wrap around the image in certain appealing way.

    2. Allowing paired side-by-side images set at the same height to display at the same height.

    #1451858

    musicdoc1
    Member

    3. Allowing paired side-by-side images to fit on the same line of a post. On this theme the maximum combined width of two images (with borders) is 510 pixels. One more pixel and the second image gets bumped down to the next line. The recent modification by WordPress that makes the “size-medium” tag override user-chosen image dimensions creates havoc with many paired images. They often now display on top of each other, each at the width of 450 pixels, instead of the combined 510 (average 255) at which I set them. WordPress is displaying such previously paired images at an average of 76.47 % (195/255) wider than the width I set them to display at.

    #1451859

    The fix is an improvement, or may be considered an improvement, but it doesn’t really resolve the issues I’ve been dealing with. Although it eliminates the unlimited height issue I pointed out above, it only modifies the display height so that it always falls within the maximum set for a size range (small, medium, or large).

    This is the intended behavior.

    1. Allowing the user-chosen width and height settings to determine the display size of an image. User-chosen width and height settings should override the default generic size range (thumbnail, medium, large, full, etc.) necessarily applied when an image is uploaded.

    You may override the main settings by removing the “size-KEYWORD” class name (just like before for full sized images).

    What’s wrong with that? Well, for one thing it’s about 30% off the dimensions I set and saw displayed before WP decided to make the CSS tag “size-medium” override my settings.

    Yours is a special case. I’m still working on a fix for you that’s separate from the other stuff!

    #1451861

    musicdoc1
    Member

    You may override the main settings by removing the “size-KEYWORD” class name (just like before for full sized images).

    I haven’t forgotten that. Sorry if I sound like a broken record. I know that that we’ve gone over this before a couple of times. In the last post I was merely summarizing some of the major issues which remain for images uploaded prior to the recent WP modification re” “size-medium”.

    Yours is a special case.

    But hardly unique. I’ve seen countless sites with images smaller than mine. They might modify the size before uploading as timethief suggested in a related thread https://en.forums.wordpress.com/topic/photos-have-become-small-and-off-centered?replies=18#post-1448135, but this is not always the case. It would appear that anyone who frequently uses images larger than thumbnails, will likely have run into the issue of unwanted resizing created by the “size-medium”, or “size-large” (which began overriding user-chosen dimensions at an early date) class designators inserted upon uploading.

    What about the “size-full” class name? Does that also override user-set dimensions?

    #1451862

    musicdoc1
    Member

    Does the “size-thumbnail” class designator also override user-chosen dimensions?

    #1451863

    What about the “size-full” class name? Does that also override user-set dimensions?

    Does the “size-thumbnail” class designator also override user-chosen dimensions?

    Yes and yes. I hear ya about the other feedback, and it’s something we will continue to discuss internally, (so far) we feel the benefits outweigh the costs of switching.

    #1451865

    musicdoc1
    Member

    Thanks.

    #1451866

    @musicdoc1, ok, I have a tool that will let me remove all the size-thumbnail, size-medium, and size-large classes from a site in one go. Could we try it out on one of your smaller blogs first? Could you let me know which one?

    #1451867

    musicdoc1
    Member

    Great. You may test it on this small site of mine:

    http://sbfiesta.wordpress.com/

    #1451868

    musicdoc1
    Member

    And please try it on this one as well:

    http://olias.wordpress.com/

    #1451869

    Okay! I’ve put in a request. It will remove CSS classes size-thumbnail, size-medium, and size-large from http://sbfiesta.wordpress.com/ and http://olias.wordpress.com/

    It may take a little time for the tool to run (I’m not sure how long) or it might be really quick, so keep an eye on the blogs. I’m traveling today, so I will be in and out. I’ll check back in later tonight.

    #1451870

    musicdoc1
    Member

    Thanks,

    Checked both sites at c. 3:00-3:15 PM today, using the general search “size-” and other more specific searches.

    * Viva La Fiesta:
    All posts are clear, but three pages are still affected.

    * Olias of Sunhillow:
    The posts appear to be clear, except that four of the five published posts contain the class name “size-full”. This doesn’t appear to be being applied by WP presently, but might it be someday?

    A few pages are still affected variously by the “size-thumbnail” (1 page), and “size-medium” (2 pages) class names, as well as by “size-full” (2 pages).

    #1451871

    musicdoc1
    Member

    Checking again at 7:25 PM

    * Viva La Fiesta:
    The same three pages noted at 3:38 PM today are still affected. However, one page is a draft and the other two are pending which might be why your tool missed them. There are only four images involved, with four class names: three “size-medium”, and one “size-full”.

    * Olias of Sunhillow:
    Same posts and pages affected as reported at 3:38 PM today.

    #1451874

    musicdoc1
    Member

    I know that some of the class names were removed from http://sbfiesta.wordpress.com/ with the tool, because I noticed that a couple of images on the front page had been fixed after you ran it, but I forgot to check how many posts, pages, and images were affected before you used the tool.

    In 8 days I’ve corrected about 7% of the incorrectly published images, and about 5% of all of the images containing an unwanted class name.

    Here’s a note to my visitors affixed above the header image, i.e. in the General Settings > tagline area:

    Due to an unexpected design modification by the server, WordPress, on 20 September several thousand images on the site suddenly began displaying too large, often double or more the set size. Unless WP fixes the problem, it will likely take me months to individually correct the size of each altered image. Update, 28 Sep: I’ve corrected roughly 5% of the errors in the past 8 days

    #1451875

    musicdoc1
    Member

    I’ve recalculated the estimates given above. It looks like I’ve fixed approximately 6-7% of all the unwanted class names in 8 days. Without searching the HTML code of every image on the site, it impossible for me to get a precise count of the number of images affected. But assuming that my estimate is reasonably accurate, at the present rate it would take me close to 4 months to remove all of the unwanted class names from the affected images.

    #1451876

    musicdoc1
    Member

    In my last post, instead of “Without searching the HTML code of every image on the site…”, I meant to say and should have said “Without searching the HTML code of every image on an affected page or post, etc.” An affected page or post is one that has at least one unwanted “size-(value)” class name in the image codes.

    #1451879

    musicdoc1
    Member

    In my Sep 28, 11:07 PM post and others in this thread, the percentages of images re-sized (fixed) are for images on Songbook only, not the smaller sites.

    I don’t even know the number of sites of mine that are affected by the recent media settings-blog interaction modification, because most of the sites I’ve created are relatively inactive. That doesn’t mean I might not want to revive them some day.

    I was most active from 2008 to 2010 in creating new blogs, and have multiple accounts (two of them with dozens of blogs each, though some are co-administered). The number of affected blogs is certainly more than 70, so a tool which could remove the unwanted class names such as “size-medium” from the image codes throughout each site would be hugely helpful. It is urgently desired on at least a few of the more active sites, and especially on my biggest site, Songbook.

The topic ‘Why are images tagged "size-medium" in CSS displaying at full size?’ is closed to new replies.