Home>Support>img width & height is ignored

img width & height is ignored

Hi,
I recently changed my wp theme to vantage premium, and I have a problem with the old articles. I used to change image characteristics, using width & height as I needed. But now I see that these values are ignored.
An example is here, http://talentedenazdravani.eu/blog/2015/03/29/teserea-cu-fasii-de-hartie-idei-creative-106/, and the problem is with the last 5 images placed at the end of the article, which are displayed at full size, instead of using height=”150″ as I need.

<img src="https://frunzalaura.files.wordpress.com/2015/03/felicitare-tesuta.jpg" height="150" />

What can I do? Changing every image is not an option.
Tnks.

URL: http://talentedenazdravani.eu/blog/2015/03/29/teserea-cu-fasii-de-hartie-idei-creative-106/

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 9 years, 5 months ago Andrew Misplon
    Hi, I Work Here

    Hi Cristina

    Thanks for reaching out.

    On the page in question, please try this. Browse to the images in the Visual tab and hover over an image, click the pencil icon that appears, edit the image. In the right column is a size option. Try setting that to Thumbnail.

    Should hopefully do the trick.

  2. 9 years, 5 months ago Cristina

    Hi,
    I had already did that here: http://talentedenazdravani.eu/blog/2015/04/09/ghirlanda-de-pasti-cu-oua-tesute/

    Editing all the images in my site and putting them again in the posts isn’t a solution. I have thousands of them and a lot of externals URL.

    The theme that I used before was reading the height and width parameters used on the img tag (as I described above “img src=”http” height=”xx”) and displayed them accordingly.

    I discovered this:
    .entry-content img {
    max-width: 100%;
    height: auto;
    }
    If I delete the height: auto it will display OK, but I don’t want to edit the theme CSS.
    How can I edit this in the child theme?

    Thanks,

  3. 9 years, 5 months ago Andrew Misplon
    Hi, I Work Here

    Thanks for the feedback. The challenge here is those images aren’t 150 wide. We can delete the height: auto; property from the Vantage style.css file, this unfortunately isn’t upgrade safe. The property would return after a theme update. To make this change via Custom CSS there are four possible values the height property accepts:

    auto | length | initial | inherit

    None of those take us back to the default you’re looking for. Let me take another look a little later and see if there isn’t another solution I can think of.

  4. 9 years, 5 months ago Cristina

    Thank you.
    For now I deleted the property from Vantage style.css file, it cannot stay unsolved ….

  5. 9 years, 4 months ago Cristina

    Deleting that property is not a solution :( . After I deleted it I saw that images are not re-sizing correctly in responsive view, so I had to put it back… On mobile devices the height stays the same, only the width become smaller.

  6. 9 years, 4 months ago Andrew Misplon
    Hi, I Work Here

    Thanks for the feedback. More info is always useful.

    A little background on what’s happening. Almost all modern themes and frameworks use the following CSS image declaration:

    max-width: 100%;
    height: auto;
    

    This ensures that images don’t overflow their container and that they stay responsive and scale on smaller devices.

    There is unfortunately no way, within the current CSS spec to undo height: auto;. That unfortunately leaves the following options: you could manually remove all of the image height attributes or, after each update, remove the height property from the style.css file.

    If you leave the height: auto; property you’ll need to re-size your images in another way. The most conventional way is using WordPress. If you hover over an image and click the pencil icon to edit it, you’ll see a size option drop down menu in the right bottom corner, there you can select Thumbnail, Medium, Large or Full. These sizes can be set from Settings > Media.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More