I see that Salient generates 19 different sizes for each of my images. This is generating a huge number of files on my hosting server. To avoid taking up unnecessary server space, I would like to remove the sizes that are not used.
1) I have seen the documentation how to remove the sizes but they don't seem to correspond to the number of sizes I have.
2) But my main question is - how can I determine which sizes are not used in my website? If I remove a size, will the next size up or down be chosen or will I have a blank space?
Thank you for your reply. I don't mean the 3 sizes generated by WordPress I mean the files generated by Salient. In the ecommerce ultimate demo I installed I count 17 instances of each image. See attachment.
In the documentation you explain how to remove the image size but they don't correspond to the sizes I have and how do I remove all the unwanted ones once they are created and which are the essential ones?
For the other image sizes generated by the theme, you will need to edit the media.php (/nectar/meta/category-meta.php) file in order to disable the sizes. The best option would be to 'comment out' whatever sizes you don't need.
The documentation says to change file functions.php, you tell me to change file /nectar/meta/category-meta.php file but actually I found the image sizes in /nectar/helpers/media.php
So my main question is out of all these sizes which ones are necessary for the correct functionning of the website?
To clarify, you'd have to add the code to the functions.php file of your child theme to override the changes in your theme.
I can't define which sizes are important to you as this would depend on your preference as all the sizes are used by the theme in different instances depending on your settings.
Thank you Andrew. So basically these 14 extra image sizes are created if you want to use a photography or portfolio grid but unnecessary if you are just using an ecommerce theme.
It would be nice to have this as an option in the Portfolio section of the Theme Options for example.
I see that Salient generates 19 different sizes for each of my images. This is generating a huge number of files on my hosting server. To avoid taking up unnecessary server space, I would like to remove the sizes that are not used.
1) I have seen the documentation how to remove the sizes but they don't seem to correspond to the number of sizes I have.
2) But my main question is - how can I determine which sizes are not used in my website? If I remove a size, will the next size up or down be chosen or will I have a blank space?
Thank you in advance for the advice.
Hello there,
Thank you for reaching out to us.
By default, WordPress generates three sizes for every image uploaded. You can find more information about disabling those default sizes here: https://www.wpbeginner.com/wp-tutorials/how-to-prevent-wordpress-from-generating-image-sizes/. You can also view this article to help you clean up your gallery https://wpengine.com/resources/wordpress-media-library-clean-up/.
Kind regards,
Hello Andrew
Thank you for your reply. I don't mean the 3 sizes generated by WordPress I mean the files generated by Salient. In the ecommerce ultimate demo I installed I count 17 instances of each image. See attachment.
In the documentation you explain how to remove the image size but they don't correspond to the sizes I have and how do I remove all the unwanted ones once they are created and which are the essential ones?
Attached files: Salient-İmage-Sizes.png
Salient-doc-about-images.png
Hello again,
Thank you for getting back to us.
For the other image sizes generated by the theme, you will need to edit the media.php (/nectar/meta/category-meta.php) file in order to disable the sizes. The best option would be to 'comment out' whatever sizes you don't need.
In the meantime, you can use any of the plugins suggested here to clean your media gallery https://wpengine.com/resources/wordpress-media-library-clean-up/.
I hope that helps.
Kind regards,
Dear Andrew,
The documentation says to change file functions.php, you tell me to change file /nectar/meta/category-meta.php file but actually I found the image sizes in /nectar/helpers/media.php
So my main question is out of all these sizes which ones are necessary for the correct functionning of the website?
Which are needed?
Hello again,
To clarify, you'd have to add the code to the functions.php file of your child theme to override the changes in your theme.
I can't define which sizes are important to you as this would depend on your preference as all the sizes are used by the theme in different instances depending on your settings.
I hope that info helps.
Kind regards,
Thank you Andrew
So basically if I don't use Portfolio I go copy the file nectar/helpers/media.php to my child theme
I disable the line for the image sizes I don't need
I add this code??? to my functions.php file in my child theme?? Or something else??
Hoping you can clarify for me, I just need clear explanations to settle the issue please. Thank you
Hello again,
We normally recommend making any changes to the theme in the child theme function.php files.
You can also refer to this ticket for further clarification https://themenectar.ticksy.com/ticket/2386230/.
I hope that clarifies this query.
Kind regards,
Thank you Andrew. So basically these 14 extra image sizes are created if you want to use a photography or portfolio grid but unnecessary if you are just using an ecommerce theme.
It would be nice to have this as an option in the Portfolio section of the Theme Options for example.
Hi there,
Sure, we'd love to take this as a suggestion to help us improve on our features for the coming updates.
Please feel free to contact us in case of any other queries.
Thanks.