Tag Info

New answers tagged


OK I have found out a way to do this. With the plugin, with some checkboxes I am setting a crop option in the db in wp_options table, just like WP does it for the thumbnail, medium and large sizes. So my big image sets the add_option('big_crop', true) Than in functions.php I do: if ( get_option( "big_crop" ) == true ) { add_image_size( 'big', 1500, ...


wp_get_attachment_image_src(get_the_post_thumbnail($post_id, array( 100, 100)));


Found out that the answer was these two functions: https://codex.wordpress.org/Function_Reference/wp_generate_attachment_metadata https://codex.wordpress.org/Function_Reference/wp_update_attachment_metadata

Top 50 recent answers are included