WordPress.org

Ready to get started?Download WordPress

Forums

WordPress image resize hook (3 posts)

  1. xeskor
    Member
    Posted 1 year ago #

    Any relevant help will be appreciated.

    I want to make rounded cornres on images off certain image size. For example I have add_image_size('xx', '320', '320', true);

    Can I hook to this function and add rounded corners after resizing?

  2. redrocksrover2
    Member
    Posted 1 year ago #

    Add the rounded corners with CSS. Instead of creating an image link like:
    <img src="myimage" with="320" height="320" alt="" />

    Insert your image as the background of a <div> or other HTML element, then set the CSS border-radius of that element as you like. The border radius of the element will clip the background image and make it look like your image has rounded corners.

    See:
    http://answers.oreilly.com/topic/1002-how-to-set-a-rounded-border-around-an-image-using-css/

    Also:
    http://caniuse.com/#feat=border-radius

  3. xeskor
    Member
    Posted 1 year ago #

    I have to change image with php gd. It is necessary

Topic Closed

This topic has been closed to new replies.

About this Topic