Forum Replies Created
-
AuthorPosts
-
Hi there again,
First of all thanks for getting back to me this fast. If you have a blog, I would gladly share it :)
After running some tests uploading a few pictures, it looks like your code (the initial one you provided) actually works. But for some reason the registered image sizes continue to appear on the Regenerate Thumbnails plugin. This is strange because the thumbnails corresponding to those sizes are not created (so your solution works great). I have tried a plugin called Simple Image Sizes, which allows you to remove registered sizes and when you do that with this plugin, then, these sizes won’t show up on the Regenerate Thumbnails plugin. One thing about this plugin is that when I click on regenerate it doesn’t remove the unregistered image sizes. However, there’s another plugin called Regenerate Thumbnails Advanced by Shortpixel that work.
Anyway, your solution works fine when uploading new images and I’m very happy with that, so thanks for your support.
Regarding the Trimage software, I have tried to download it for Mac following the instructions they provide on their web but I haven’t been able to do it. Any other alternatives that you know?
Finally, there’s something else I wanted to ask you. I like your idea very much of being you who controls what image is served (instead of letting WordPress/Enfold choose). But there’s something that I’m not sure if could be improved in this process (just curious to know your thoughts about it). It’s the idea behind the srcset attribute but done deliberately by you. That is, optimize manually the images choosing the dimensions for different devices and then let the browser decide which one of the images that you have created serve. In other words, it would be implementing the srcset but in a controlled way, since it would be us who would decide which image sizes are correct.
What do you think?
Again, thanks so much for your help and for sharing your solution.
Regards,
Hi there,
Thanks a lot for sharing this so fast. I have already tried tried it but it looks like the function to remove the default image sizes is not working for me, because when I check with the plugin Regenerate Thumbnails, those image sizes are already registered as you can see on the following screenshot:
Any idea why this function is not working?
Thanks a lot for your help, I really appreciate it.
Also thanks a lot for your tips on the lossless compression, I will definitely try it.
Hi there, I’ve been trying to implement your solution on my website. And I must say I really love it how you approach the problem of duplicated files on your server. That being said, when I use your code, only some thumbnails are removed. Basically those defined by Enfold. But the WordPress registered images sizes are still there. I’m using the Enfold child theme and I have copied your code on the functions.php file.
Any ideas of why only the image sizes defined by Enfold are removed but not the ones defined by WordPress? Here’s a screenshot of the plugin Regenerate Thumbnails where you can see the currently registered thumbnails:
And here’s the current code I’m using, just in case it helps:
// remove “responsive images” functionality in WP 4.4 and higher
add_filter(‘wp_get_attachment_image_attributes’, function($attr) {
if (isset($attr[‘sizes’])) unset($attr[‘sizes’]);
if (isset($attr[‘srcset’])) unset($attr[‘srcset’]);
return $attr;
}, PHP_INT_MAX);
add_filter(‘wp_calculate_image_sizes’, ‘__return_false’, PHP_INT_MAX);
add_filter(‘wp_calculate_image_srcset’, ‘__return_false’, PHP_INT_MAX);
remove_filter(‘the_content’, ‘wp_make_content_images_responsive’);// Disable loads of Enfold & WP image sizes upon upload
// do image sizes manually, double-size with high compression for retina screens
// use Photoshop to set exact double size and quality between Q30 and Q40
add_action(‘init’, ‘remove_enfold_image_sizes’);
function remove_enfold_image_sizes() {
// do NOT remove widget size, is used in backend portfolio items!
// remove_image_size(‘widget’);
remove_image_size(‘square’);
remove_image_size(‘featured’);
remove_image_size(‘featured_large’);
remove_image_size(‘portfolio’);
remove_image_size(‘portfolio_small’);
remove_image_size(‘gallery’);
remove_image_size(‘magazine’);
remove_image_size(‘masonry’);
remove_image_size(‘entry_without_sidebar’);
remove_image_size(‘entry_with_sidebar’);
remove_image_size(‘shop_thumbnail’);
remove_image_size(‘shop_catalog’);
remove_image_size(‘shop_single’);
remove_image_size(‘shop_gallery_thumbnail’);
remove_image_size(‘1536×1536’);
remove_image_size(‘2048×2048’);
remove_image_size(‘shop_single’);
remove_image_size(‘extra_large’);
//remove_image_size( ‘large’ );}
// Remove unneeded WP image sizes
add_filter( ‘intermediate_image_sizes_advanced’, ‘prefix_remove_default_images’ );
// Remove default image sizes here.
function prefix_remove_default_images( $sizes ) {
// do NOT remove small and medium sizes, they are used in backend Media Library!
// unset( $sizes[‘small’]); // 150px
// unset( $sizes[‘medium’]); // 300px
unset( $sizes[‘medium_large’]); // 768px
//unset( $sizes[‘large’]); // 1030pxreturn $sizes;
}Thanks so much for your help.
February 4, 2020 at 11:13 am in reply to: Full width submenu displaying a bar under it on mobile #1181217Hi,
Now it works, thanks a lot :)
I have one additional question. If I want to add this changes with a child theme, how should I do it? Install the Enfold child theme and add this custom code to the file style.css?Best regards,
DavidJune 21, 2019 at 1:37 pm in reply to: Woocommerce Bookings option to display calendar on click not working properly #1112325Hi Ismael,
Thanks for your reply. The calendar is loading without the CSS if I set the “Alway visible” option on the product details. The problem is with the “Show calendar on click” option. It doesn’t display the button “Choose”. When I change the theme to one of wordpress defaults (twenty seventeen for instance), the button is there.
What can I do to make have the “Choose” button displayed on load? I don’t really know what to do with that render information you suggest me to ask the plugin author.
Thanks in advance.
June 20, 2019 at 8:33 pm in reply to: Woocommerce Bookings option to display calendar on click not working properly #1112097Hi again,
any news from the enfold team? I’ve been trying to have support for this issue for almost a month now and for the moment all I’m getting are vague responses every now and then.
June 18, 2019 at 5:00 pm in reply to: Woocommerce Bookings option to display calendar on click not working properly #1111368June 18, 2019 at 4:31 pm in reply to: Woocommerce Bookings option to display calendar on click not working properly #1111353Hi Victoria,
I don’t want to change any style, I just need to display the button “Choose” as it is displayed on the the Enfold Spa demo:
Where do I select this option?
Thanks and regards,
June 16, 2019 at 7:04 pm in reply to: Woocommerce Bookings option to display calendar on click not working properly #1110859Hi Victoria,
What I want is exactly the same thing you have on the enfold demo spa, on the booking page (see links). By default I don’t want the calendar to be visible, I want it to appear when I click on the “choose” button, next to the “Date” label (see image). But when I select this option on the purchase button element it won’t display the “choose” button on the page (as it appears on the image attached.). It is there, I can see that when I inspect the page, but somehow there’s an issue that makes it invisible (the image you have sent me doesn’t show the “choose” button but it should be there).
Screenshots:
1) This is how I want my booking section looks like, with the calendar hidden and the “choose” button.
2) And this is how I want my booking section to look like when I click on the “choose” button, that is, with the calendar visible:
What can I do to fix this?
Thanks and regards,
June 13, 2019 at 9:55 pm in reply to: Woocommerce Bookings option to display calendar on click not working properly #1110123This reply has been marked as private.June 13, 2019 at 7:16 pm in reply to: Woocommerce Bookings option to display calendar on click not working properly #1109995This reply has been marked as private.June 11, 2019 at 5:02 pm in reply to: Woocommerce Bookings option to display calendar on click not working properly #1109218This reply has been marked as private.June 10, 2019 at 4:48 pm in reply to: Woocommerce Bookings option to display calendar on click not working properly #1108846Hello, anyboydy there?
June 6, 2019 at 1:24 am in reply to: Woocommerce Bookings option to display calendar on click not working properly #1107767This reply has been marked as private.June 4, 2019 at 12:16 pm in reply to: Woocommerce Bookings option to display calendar on click not working properly #1107044This reply has been marked as private.Hi, I had it sorted. There was a problem with cache.
Thanks for your quick reply.
Hi, I’m having the following issue when trying to display some sections just on mobile and some sections just on desktop on my page david.travel. I was using the Quick CSS with the following code:
@media only screen and (min-width: 769px) {
.only_mobile { display: none !important;}}@media only screen and (max-width: 768px) {
.only_desktop { display: none !important;}}It was working great until I decided to load another enfold demo (2017). And suddenly it stopped working. The coming soon page stopped working as well as other pages in which I was using different id’s for mobile and for desktop. The weird thing is that I tried that on another page with the same coming soon page (david.photo) and it’s not working either.
What can I do? It’s a bit frustrating.
November 20, 2018 at 10:21 am in reply to: Image sliders does not resize image to fit within the selected dimentions #1035493Hi there! Thanks for your answer. That’s not exactly what I need. I hope someone can give me an answer.
November 19, 2018 at 7:24 pm in reply to: Image sliders does not resize image to fit within the selected dimentions #1035306Hi there, any updates on this topic? I’m also having a similar issue when using the easy slider instead of the background image on the demo “freelancer”.
I’m creating a web where I want a slider with different images instead of a static image. I’m using the same image that comes with the demo (freelancer-girl-687×1030) with the same dimensions but when using the easy slider I the height is different (more than 100% of the screen size).
What can I do to get the same result as if I were using the background image?
Here’s a link to the website? First section is the original one; second section is a duplicated on but using an easy slider instead of a background image.
david.travel/home-1
Thanks in advance.
- This reply was modified 6 years ago by dgvicario. Reason: web link missing
-
AuthorPosts