Long External Image URLs save but do not appear in Media and so do not have captions, alt text or title text

In some cases, you may try to add image URLs which are too long for WordPress to handle.

Some text gets stripped from some URLs inside wp-db.php

Text gets checked prior to insertion to the database – if the length of the GUID is too long, the image does not get saved to the Media library which prevents adding alt text/captions/titles

An example of an image URL that fails like this is:


This is 330 characters long which exceeds the limit of 255 characters.

The limit of 255 characters for a GUID/URL is historical and there are actually still many devices which cannot handle URLs greater than 255.

If you experience this issue, you can either use shorter URLs or use a URL shortener to create shorter URLs.

If you do experience this issue, the image will still appear in the post/product/page media editor, and it will still appear on the front end but since we cannot fake the media attachment in the database it means we cannot store any texts such as alt text, caption text or title text for your image.

Be the first to comment and we'll reply right away.

Leave a reply

Super Speedy Plugins