-
AuthorPosts
-
May 11, 2017 at 9:04 am #791547
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 ?-
This topic was modified 8 years, 5 months ago by
Luc.
May 11, 2017 at 10:09 am #791566if 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' ), ) ); }May 11, 2017 at 10:14 am #791568thanks guenni007, in child functions.php ?
May 11, 2017 at 10:23 am #791572sorry – yes
and the “true” concerns to crop behavior
and i think that choose is not necessary if you overwrite an existing oneps you can find a lot of nice functions in function-set-avia-backend.php
and on line 546 the add_image_size function-
This reply was modified 8 years, 5 months ago by
Guenni007.
May 11, 2017 at 10:53 am #791581Thans a lot ! It works like a charm !
May 11, 2017 at 10:55 am #791582ps you can find a lot of nice functions in function-set-avia-backend.php
Where is this file ?
May 11, 2017 at 11:29 am #791591it is in /framework/php/ but you have to be able to read and interpret it as well
May 11, 2017 at 2:15 pm #791642PPS: if you have to get for your old uploaded files the new format – you might use a plugin like force regenerate thumbnails
May 11, 2017 at 2:17 pm #791643yes, it is done ;) thanks a lot !
May 11, 2017 at 2:43 pm #791654Hi,
Thank you for your valuable input,@Guenni007! :)
Luc, do you still need assistance with this topic?
Best regards,
SarahMay 11, 2017 at 2:44 pm #791655it’s ok for me, you can closed this topic ;)
-
This topic was modified 8 years, 5 months ago by
-
AuthorPosts
- The topic ‘Created a New size image’ is closed to new replies.
