Hi,
I have found this topic in forum :
https://kriesi.at/support/topic/enfold-image-sizes/
the solution is ok but If we change the size in functions.php this will be overwritten at the next theme update. What do you propose to do that the modification is durable?
Can I do this in functions.php in theme child ? If yes, how overwrite this ?
if you want to create a new image size and enable to choose it via selection:
// add new size or overwrite an existing size
add_image_size( 'new-size', 2000, 500, true );
// make the new size available in the media library (and image element etc.)
add_filter( 'image_size_names_choose', 'my_custom_sizes' );
function my_custom_sizes( $sizes ) {
return array_merge( $sizes, array(
'new-size' => __( 'New Size' ),
) );
}
thanks guenni007, in child functions.php ?
sorry – yes
and the “true” concerns to crop behavior
and i think that choose is not necessary if you overwrite an existing one
ps you can find a lot of nice functions in function-set-avia-backend.php
and on line 546 the add_image_size function
Thans a lot ! It works like a charm !
ps you can find a lot of nice functions in function-set-avia-backend.php
Where is this file ?
it is in /framework/php/ but you have to be able to read and interpret it as well
PPS: if you have to get for your old uploaded files the new format – you might use a plugin like force regenerate thumbnails
yes, it is done ;) thanks a lot !
Hi,
Thank you for your valuable input,@Guenni007! :)
Luc, do you still need assistance with this topic?
Best regards,
Sarah
it’s ok for me, you can closed this topic ;)