WordPress.org

Ready to get started?Download WordPress

Forums

Custom image sizes in pages and posts (1 post)

  1. richcon
    Member
    Posted 3 years ago #

    On my custom wordpress-based site, I have several custom image sizes set which are used by the theme.

    (For example, a "max-50" size creates a thumbnail image that fits inside a 50x50 pixel box and is defined with the PHP code "add_image_size( 'max-50', 50, 50, false );". Other options include things like "page-width" which size the image to fit within the horizontal margins of the page. I have lots of these, as each section of my site has its own image size requirements.)

    I know how to reference these custom sizes in my theme files. But is there any way to reference them in page and post content? For example if I have a gallery page showing off images, or a page with images in the margins, I'd like to choose one of these custom sizes rather than the stock "Thumbnail", "Medium", "Large", and "Full Size" options.

    Is there any way to do it?

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.