Forum Replies Created
-
AuthorPosts
-
If I regenerate the thumbnails will all the srcset definitions be changed to remove the’ xyz x 400.jpg’ references?
re. gif format – the images are quite old and I must have mistakenly created them as that rather than jpg; there are only 22 gifs out of over 4000 images on the site, I might get around to changing them.
Thank you for the function but it is the 400px height of the deleted portrait images that I need to target and remove from srcset. Changing $width to $height doesn’t work. $width == 170 does, but I don’t know the widths of all the 400px tall images that I deleted because…
When portrait format images were uploaded originally, Enfold portfolio size image (495x400px) was enabled. The upload process used the Max Height of 400px to create the new portfolio size, so the width was smaller and varied – the leaflet is 170 wide, the domino 239px. The other deleted 400px images would have had multiple widths as the portrait images were all different sizes and aspect ratios. I also know that I’ve got some uploaded images with an original width of 400px so just targeting “400” in srcset isn’t an option, I need to target 400px as image height please.
@Ismael:
On this page the images “Museum Leaflet” and “Domino by Pat Thomas” are inserted on the page as 64x150px and 90x150px size images. They display correctly as that size in desktop mode. Original image upload sizes were 339x800px and 299x500px.In Dev Tools, switch to Responsive (or view on a smartphone) and the images no longer display because I have deleted the …x400px sizes.
Dev Tools Console reports:
greenville/:67 GET https://www.americanroadtrips.net/wp-content/uploads/2014/05/highway-61-blues-museum-leaflet-170×400.gif 404 (Not Found)
greenville/:67 GET https://www.americanroadtrips.net/wp-content/uploads/2014/05/domino-by-pat-thomas-239×400.gif 404 (Not Found)Let’s focus on the Leaflet image.
The first question is why is the responsive page even trying to load the 170×400.gif image – this is surely way too big for a smartphone screen and to me the specified 64x150px size should still be loaded. That aside, how to remove the x400 image from srcset?
Second, these are the files in Media Library.
highway-61-blues-museum-leaflet-127×300.gif
highway-61-blues-museum-leaflet-222×525.gif
highway-61-blues-museum-leaflet-34×80.gif
highway-61-blues-museum-leaflet-64×150.gif
highway-61-blues-museum-leaflet-76×180.gif
highway-61-blues-museum-leaflet.gifIf you look at srcset for the leaflet, you will notice that highway-61-blues-museum-leaflet-76×180.gif is not listed within. Not that I’d want that size displayed either, but surely it should be included? Is this an error?
@Guenni007 – thanks but have a function to remove the image sizes I don’t use. I implemented it when I found out a few months after using Enfold for the first time (years ago…) about the huge number of image sizes it creates, most of which are never used. That is the ultimate cause of my problem here – I’d uploaded images and created pages then discovered I was almost out of disk space, so deleted all sizes I never use. But by then the deleted image sizes had been inserted into srcset, some don’t display as I’ve deleted them, and there is no (apparent) way to change the srcset HTML after it has first been created.
@Guenni007 – refresh and re-enable didn’t work.
If I regenerate the thumbnails will that force a code change to all the srcset definitions? That’s what I need, something to force the HTML on each page to “regenerate” and only pick up the image sizes that now remain in the Media Library, removing all the references to the deleted sizes. I don’t understand why Updating a page doesn’t force such a reset/regeneration.
Thanks, that works.
Presumably I can now delete the previous color change statement of “.header_color .social_bookmarks a” ?
After tracking this for a while the plugin does appear to be working as it should. There was an error flagged at 07.44 am today, with the usual “Mailer: Other SMTP
SMTP Error: data not accepted etc etc” message.
The detailed debug of this showed it was an email via the contact form, which should be sent to ” (Email address hidden if logged out) “. It was from a Gmail account with the Subject “Get the Most Profitable DFY Baking Videos Message”…and is clearly spam. :-)
The email was rejected by the server and did not get sent to the Inbox or Spam folders of the chairman’s account.
The sender was spoofing the From address to ” (Email address hidden if logged out) ” which does not exist. We do have DMARC and SPF setup.
The vast majority of the blocked emails were all different “offers” and “companies” but all from one location and they helpfully included their address at the end plus an unsubscribe link. Whether this will work having used it, I’m doubtful.
So thanks for all the replies and you can close this down.In the past 2 days we’ve had 6 spam emails and 3 of the SMTP errors. There is no correlation in the time stamps between any of the emails and the SMTP errors.
There have been 2 successful email receipts from the Contact Form last Friday and Saturday that are sitting in the recipient’s Inbox (he is on holiday and not checking emails at present). Neither of these emails ties up with the SMTP errors either.
I have enabled Debug Email Sending in the plugin to see if that can provide a more detailed data when an error is generated.
The plugin is working fine – I can send test emails, plus I have Updraft Plus installed for backups and I receive emails without problem from that plugin when the backup completes.
I’m almost certain it is related to the Contact Form element. As mentioned in the OP, I was unaware of this until recently, (a) because I was getting emails from the site and (b) because SMTP Mail removes the error flag after a further successful send so it was pot luck if I logged in to the site when an error has been flagged.
Investigating a bit more, I’ve found we are getting a significant amount of messages from the Contact Form that are correctly being flagged as spam (and being routed into the Spam folder – there is some real garbage coming in…). The spammers seem to easily get around the Enfold Numeric Captcha. These emails don’t come to me (as webmaster) but to a member of the Henley Society who is, shall we say, less than tech-savvy and wasn’t aware of them. But they are being flagged as spam so they don’t bother him.
Now I’m aware of this I will follow it more closely: specifically, I’m wondering if there is a link between receiving a spam message from the Form and SMTP Mail generating an error.
Please keep this open and I’ll update when I hopefully have further info.So I have an email address in “Autoresponder From E-Mail Address” (same as the delivery email) but the fields “Autoresponder Reply To E-Mail Address”, “Autoresponder Subject” and “Autoresponder Text” are all blank/empty.
Do I need to delete the address in “Autoresponder From E-Mail Address” to stop the errors?
I don’t know what the autoresponder is and I don’t have a custom one. I’ve never heard of the filter you mention.
Where do I find Content > Backend > Autorespond you mention? (PS. Another error was generated overnight.)
Found the problem. I looked at the error messages you reference in Dev Tools on Edit Page and noted they were in one part caused by “unsafe-eval is not an allowed source of script in the following Content Security Policy directive”. If I remove all the Content Security Policy directives from .htaccess, Easy Slider works again. (I only added the CSP stuff initially a month or so ago and have not had need to edit Easy Slider until now.)
Thing is I was using the directives @Ismael suggested in this thread: https://kriesi.at/support/topic/wordpress-enfold-and-content-security-headers/ and there is no mention of unsafe-eval.
I confess to not really understanding all this CSP stuff and whilst I want the site secure it seems every time I tweak the CSP something else breaks, like Easy Slider. I note that @Guenni007’s last post indicates possible issues with LayerSlider re. CSP settings.
Bizarrely, when I remove the CSP directives, Lighthouse still gives me a 100 score for Best Practices with a note of “No CSP found in enforcement mode.”
So I guess we can close this thread – but how do we address the CSP problem? Can you work on a definitive set of CSP directives that are fully compliant with all elements of Enfold?
Hi,
Done both of those requests, made no difference.Regarding the search error, my problem is with Easy Slider. So how can I use a different keyword when that is what I’m trying to find other posts about? I don’t understand the reference to “time limit” either.
So I tried “easy” as a search term. Scroll down the listed posts, get to the bottom, nothing relevant, hit “2” to go to the next screen – and I get the “critical error” crash message again.
There’s definitely something wrong on the site. Can you not reproduce it?
I’ll post a separate query regarding the actual Easy Slider problem.
Hi Guenni007
I found this thread and have a related problem: https://kriesi.at/support/topic/lighthouse-csp-errors/
The mods can’t help – can you offer any suggestions?
Thanks.
Thanks, I know how to edit and upload .htaccess.
What I don’t know is how to amend Guenni007’s solution to fix the Lighthouse errors I listed, can you advise on that?
Thanks, all done.
I use Smush to compress and Simple Image Sizes to set custom image sizes.
That code has not made a difference, Remote Debug still says it is loading the 700px image.
But if you say it’s loading the correct image, then I’m OK with that and I’m not sure I need the extra code. I just wanted to make sure there wasn’t anything wrong with Enfold. Unless you’ve got other insight into what would cause Remote Debug to show the wrong size on my PC, I’ll just put this down to more dodgy code from Google…
One final question: on the ‘remove 495 image code’ if there were other sizes I wanted to get rid of, is this the code for multiple sizes?
if ( isset( $sources[495, 295] ) ) { unset( $sources[495, 295] );That new code has removed the 495px image, thanks.
Next problem: Remote Debug for Android says (I think) that the image actually being loaded on Android (the Intrinsic Size) is now the Full size image, 700x394px at 37.1kB, and not any of the smaller thumbnails in srcset.
Why is Android loading the Full size image (and not Square, 180x101px at 5kB, as the page states) – or am I incorrectly interpreting Remote Debug? https://imgur.com/gallery/hotel-nevada-LAGkc3e
Dev Tools says desktop PC correctly loads the 180px size in responsive mode.
I added add_filter( ‘wp_calculate_image_srcset’, ‘__return_false’ ); and it did remove srcset completely.
I’d rather use the specific filter. However after removing the above and putting the specific filter in, srcset comes back into the page but the filter does not remove the 495px image from srcset. Purged caches and did a hard browser reload as well.
November 8, 2024 at 6:53 pm in reply to: CSS in avia-style.min.css breaks MetaSlider – how to fix it? #1470929Ooops!
Mike, apologies, I misunderstood your first reply. I found
.entry-content-wrapper li { margin-left: 2em !important; }in avia-style.min.css and assumed that was the culprit (well, it was…) but not understanding where it might come from.
The problem is I have no idea why I added that CSS to the child theme, probably many years ago… :-)
I have however removed it on the test site without apparent problems. Having done that and removed the avia-style file, I don’t need the metaslider-flex CSS either and the FlexSlider is now working.
Thanks.
Please review the latter part of post #1470028.
I removed the 495px image from the equation to simplify matters.
The question now is why is Remote Debug for Android devices indicating that Android is loading the Full size (700x394px) image and not the Square (180x101px) specified? Yet on PC desktop the correct 180px image is being loaded. Or is Remote Debug wrong?
November 8, 2024 at 1:43 pm in reply to: CSS in avia-style.min.css breaks MetaSlider – how to fix it? #1470905The CSS works but I am confused.
The entry-content-wrapper li declaration was in the file avia-style.min.css and this is what was causing the FlexSlider to display incorrectly.
I have deleted that file, and therefore it should no longer be loaded, so why is the CSS needed?
November 7, 2024 at 5:31 pm in reply to: CSS in avia-style.min.css breaks MetaSlider – how to fix it? #1470852Hi,
So here’s the thing. I used to use the theme’s File Compression And Merging feature but no longer do, it is now disabled.
Am I right in thinking therefore that I can delete this file as it is no longer needed?
You say it is added to my child theme CSS. How do I need to re-load/re-build that file to make sure the avia-style code is not included anymore to stop the ‘interference’ with FlexSlider?
I last updated this support request a week ago but there has been no response since.
Is this being looked at or is there any update?
Still doesn’t show the image after clearing phone cache. Have re-loaded the page multiple times.
I turned on Remote Debug for Android devices and inspected the page via Dev Tools – https://imgur.com/gallery/debug-dQTFKAs.
As you can see the phone is still trying to load the 495×279.jpg file, which no longer exists.A similar problem existed on the next day’s page. Android was trying to load the 495px images of the top two photos. So, I re-uploaded both of those photos and edited the page to load these new images.
The original image is FULL. As 495px is no longer allowed, just 4 thumbnails were created as below.
FULL (700×394)
MEDIUM (300×169)
SQUARE (180×101)
LEAFLET (150×84)
THUMBNAIL (80×45)
Screen capture of Uploads – https://imgur.com/gallery/files-GSxY4FPSo forget about the 495 px image above, here’s the crux of the issue – I’d like to understand if this is correct behaviour or if there’s a problem with the image size being loaded by Android. My phone is a OnePlus 5, 5.5-inch display with a resolution of 1920×1080 pixels, the same pixel resolution as my desktop screen. As stated before, my desktop screen only ever shows the 180px image.
The new img code for the re-uploaded images lists all 5 image sizes above.
<img decoding="async" aria-describedby="caption-attachment-14027" class="wp-image-14027 size-square" src="https://www.americanroadtrips.net/wp-content/uploads/2024/10/Hotel-Nevada-2-180x101.jpg" alt="Hotel Nevada #2" width="180" height="101" srcset="https://www.americanroadtrips.net/wp-content/uploads/2024/10/Hotel-Nevada-2-180x101.jpg 180w, https://www.americanroadtrips.net/wp-content/uploads/2024/10/Hotel-Nevada-2-300x169.jpg 300w, https://www.americanroadtrips.net/wp-content/uploads/2024/10/Hotel-Nevada-2-80x45.jpg 80w, https://www.americanroadtrips.net/wp-content/uploads/2024/10/Hotel-Nevada-2-150x84.jpg 150w, https://www.americanroadtrips.net/wp-content/uploads/2024/10/Hotel-Nevada-2.jpg 700w" sizes="(max-width: 180px) 100vw, 180px">#1 – The page specifies to display the Square thumbnail at 180px wide: if I am stating I want a 180 px image to display, why does srcset list the Medium and Full image sizes as options when these are larger than what the page code specifies? (i.e. how does srcset work? I wouldn’t have expected it to include larger image sizes than specified)
#2 – Remote Debug for Android says (I think) that the image actually being loaded on Android (the Intrinsic Size) is the Full size image, 700x394px at 35kB, and not any of the smaller thumbnails. Why is Android loading the Full size image (and not Square) – or am I incorrectly interpreting Remote Debug?
Sorry, forgot about that…
Details in private.
In debug mode, the page has this:
[caption id="attachment_7644" align="alignright" width="180"]<a href="https://www.americanroadtrips.net/wp-content/uploads/2019/11/Hotel-Nevada.jpg"><img class="size-square wp-image-7644" src="https://www.americanroadtrips.net/wp-content/uploads/2019/11/Hotel-Nevada-180x101.jpg" alt="Hotel Nevada at night" width="180" height="101" /></a> Hotel Nevada at night[/caption]…but this gets translated on the live page to the img code with srcset and sizes that I posted above.
What happens when you remove the srcset and sizes attribute from the image?
How do I do that?
I also read up into this after your reply and just cannot understand Google’s rationale or stance here. Rhetorical question: how are we site owners supposed to try and tune our sites to get good mobile scores on Lighthouse when their tool doesn’t give accurate real-life results. e.g. Lighthouse says a Largest Contentful Paint on mobile of 6.2 secs vs 0.9 sec on desktop when on a real smartphone a new page displays in milli-seconds? Answers on a postcard… ;-)
So yes, close it please.
-
AuthorPosts
