Since about a week back, I’ve started to experience failures in uploading images using the “upload files” option in “Add media”. When it fails, the upload eventually times out and I get the following error message:
Post-processing of the image likely failed because the server is busy or does not have enough resources. Uploading a smaller image may help. Suggested maximum size is 2500 pixels.
The images are relatively small. 900x500px and about 80kb in size, so the message is probably a generic one. Strangely, when I go back later to check the media page, the images have been uploaded although it gave me that error message and was stuck loading.
I don't believe it's a server issue because on my other sites which use the same theme and are on the same server, I don't have this issue.
I tried deactivating one plugin at a time but that didn’t help. Later I noticed that if I upload the original image (400 kb) it uploads with no issue. If I compress it in Photoshop (80kb) as I have always done in the past without any problems, then it gives me the error.
This is so odd. Compressing in Photoshop by setting quality to 50% (or lower) suddenly now fails upload (but work only a week ago). However, setting quality between 51-100% works fine when uploading.
Any suggestions?
Related
I have developed wordpress website but after hitting it is taking so much time for loading , this is my website link http://www.dahotreanddahotre.com/.
Tell me any plugin or manual setting such that i can decreases the loading time of my website?
There are a few things you can do:
Cache
Use a cache system: https://wordpress.org/plugins/wp-super-cache/
This will let you serve your fixed pages a lot faster to the user.
Minify
Use some minifier: https://wordpress.org/plugins/fast-velocity-minify/
This will make included javascript, css files smaller and thus they will take less time to load
Identify image needs
Looking at the network dev-tools a lot of the loading time (4 seconds +) comes from huge images:
1st image (1.47MB): http://www.dahotreanddahotre.com/wp-content/uploads/2019/03/We-intend-to-be-your-financial-lifeline.jpg
2nd image (1.64MB): http://www.dahotreanddahotre.com/wp-content/uploads/2019/03/We-are-startup-friendly.jpg
Use a Image compressor before uploading them and don't upload images that are bigger than you need.
For example image2 is: 4,300px × 2,862px this could be reduced and compressed.
By decreasing it's size to: 2,150px x 1,431px and compressing it, it becomes only: 350kb
Checking unreachable resources
Still looking at the dev tool I could see some fonts which where giving a 404 error (almost 2 seconds loading).
This means the font is unreachable but the browser still spends time to try to load it.
Make sure all resources are reachable and unused one are deleted.
Use good hosting
Avoid bunch of plugins
Get a custom wordpress theme starting from scratch
Avoid page builders
Optimize images used in website
This image will randomly become corrupted, like above, when gathered through Simply Static (also reproduced with NGINX Caching server).
Then if I were to visit the actual page displaying this image on WordPress, it's corrupted as well! Except if I do a HARD Refresh (CTRL + F5), then it comes back to normal.
I just have no idea how that could happen, hence my question in here!
[Running through docker wordpress:5.0.3]
Well, actually, even without any Caching mechanism the issue can still happens.
Increasing PHP memory_limit property did the trick.
I also optimized those images.
I am trying to download all (about 2000) of the Google Doodles (not .gif or interactive ones) from their archive, however I have been having no luck in doing so.
I have tried many scraping commands for terminal, and a few packages from Github, such as ImageScraper. Through each of the different ways I have tried, I found that either:
the process just gets stopped after about 100 images using this chrome extension
it downloads only some sample images (most command-line tools did this)
just downloads a couple of images and did not keep going
The archive itself is not indexed from what I can see and each image has its own name, which also makes it harder. To keep viewing more images, the page also needs to keep being loaded as you scroll further down (causing the issue of only downloading a few images). I am also worried that the connection or something may be being cut-off so that these cannot be all downloaded at once, probably to not cause overload (not sure how to fix this though).
I would very much appreciate anyone's help, who has experience in retrieving/scraping such images, given the mentioned problems.
I'm implementing HTTP/2 push on my website. After having made it work, I'm bit surprised on the waterfall I get. I enabled throttling in Chrome to "Slow 3G" to see more accurately what is happening.
I'm pushing 4 assets (in that order):
home.min.css (12kB)
front_layout.css (213kB)
front_home.css (8kB)
front_layout.js (360kB)
Here is what I get during loading:
You can see that the 2 biggest files I'm pushing are "Pending". I can understand this, as even the main HTML document isn't finished loading yet. But the thing is that other non-pushed assets (the 2 images just below) are already loaded! How is it possible that a pushed asset hasn't started loading whereas non-pushed assets are finished loading?
Note that the blue part of a pushed asset is defined as "Reading Push", whereas the blue part of a old style request is defined as "Content Download". Could it be a plotting error from Chrome Inspector? Or a subtle difference between content download and reading push that I do not understand?
Let's see a bit later in the loading, it's even more surprising:
There is a strange delay between the end of the main HTML document and the start of one pushed asset. It seemed to me that a pushed asset would come right after the main response data, I don't get what this ~8 sec delay comes from. What do I miss?
At page load, here is what I get:
So:
Large pushed assets start downloading after other non-pushed assets
(last line) One large image (340kB, same as my large pushed asset) on another domain finished loading before my pushed assets (dispite being slower to download).
I get the same graph with Fast 3G. Only when I totally disable throttling (running on my own machine) I get what I expect:
I'm confused on what is going on. Is HTTP2 push a good thing in my case?
I read many articles on how http2 is working exactly but I really don't manage to understand what is happening in my case. Any insight is welcome!
Thanks a lot!
I also noticed that there is a mysterious gap between my index.html and the pushed resources. The end of the blue bar for the index.html is when the browser finishes downloading the file. Then it needs to parse the HTML, once it meets the point where it needs the pushed resource then it will start requesting for it. So I guess the gap is for the browser to parse the HTML and do some background stuff (eg. loading the HTML, allocating space...)
I'm not sure if this is the correct explanation but hope it could give you some insight (after all this time... or if you did find out the answer please share it! thx)
I have written a small picture script which shows a directory listing with thumbnails and also previews of the pictures.
Directory listing example
Image preview example
Source code
In some cases, when you click through several image previews (you can also use the arrow keys left/right to do that faster), some images don't fully load (and they are only shown partly then).
I think this has started to appear more often since I am preloading the next few pictures but it also has appeared before. This also occurs most often if you switch the images very fast.
I wonder why this appears and how I can avoid this. I guess that the browser somehow looses some connection to the server (or the server closes it unexpectedly for some reason). Thus I tried to work around this by setting Content-Length (and I was hoping that the browser would reconnect automatically if the file was not received fully) but that didn't helped.
Also, in the browser, a normal reload of the page doesn't help, I have to force a full reload.