• Hi,
    it’s possible to create additional image size from another custom image size?
    I mean, if i upload a picture with the uploader and i use

    if ( function_exists( 'add_theme_support' ) ) {
    	add_theme_support( 'post-thumbnails' );
    	add_image_size( 'my-custom-img', 980, 300, true ); //(cropped)
    }

    is possible to retrive a proportional image size from my-custom-img?
    Thanks in advance!

Viewing 4 replies - 1 through 4 (of 4 total)
  • E. g. with add_image_size( 'my-thumb', 980, 9999 ); or
    add_image_size( 'my-thumb', 980); you can get auto height.

    Thread Starter mic3000

    (@mic3000)

    Thanks for your reply!
    But if i need one proportional image with the exact dimensions?
    e.g. if i insert one image 1280 x 1024 and i need
    image 1. 980 x 300 (cropped)
    image 2. 245 x 75 i need this proportional from the image 1 dimensions, because if i use add_image_size( ‘my-thumb’, 245); the height is 196px and not 75px!

    Oh, sorry, in the first example – if the height is auto – it keeps original proportions of an image.
    So, if you need an image with same proportions as a thumb, you have to add another image size add_image_size( 'my-custom-small-img', 245, 75, true );
    It will add cropped thumb as you want. Is it ok?

    Sorry again, it seems your question is advanced. Do you want something like get_option('thumbnail_size_w') from db?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘add_image_size’ is closed to new replies.