This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This topic contains 2 replies, has 2 voices.

Last updated by staceyW-3 1 week, 5 days ago.

Assigned support staff: Rohan Sadanandan.

Author Posts
September 30, 2019 at 5:41 pm #4666887

staceyW-3

I am trying to: Upload a flag for the default locate. The code is en, but the locale by default is set to en_US so that's what we will use it for. However, it has a UK flag by default, so that needs to be changed.

I have created other custom locales and uploaded flags with no issue (Austria, India, UK, South Africa). I can even add a Canadian flag to the en_US locale with no issues, but the US icon will not load. It doesn't matter which version/size of the US flag I upload - none of them work.

Once it "loads" and replaces the default flag or a previous custom one, it just says "custom en_US flag" in text where the icon should display and the menu in the dashboard shows a broken icon.

I am aware that we need to update the PHP and increase the memory allocation. I've requested these two things from my technical support, but I don't see how that would impact this, since I can upload all the other flags, just not this one.

Link to a page where the issue can be seen: Menu, WPML languages interface

I expected to see: A US flag

Instead, I got: Nothing? I occasionally get an error message if I upload a very large file. But mainly I get nothing, no error, just a broken image symbol and some text that does not help me.

September 30, 2019 at 7:21 pm #4667343

Rohan Sadanandan
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello,

Welcome to the WPML support forum. I will do my best to help you to resolve these issues.

From what I understand the issue is most probably related to the file you are uploading. Many issues can happen with the file such as file format, size, encoding etc

As a test, could you please try uploading the same file to another language. If it still does not work we can confirm that the issue is related to the file.

Let me know how it goes.

Also, I request you to update the WP Memory Limit to at least 128MB which is the minimum requirement for WPML: https://wpml.org/home/minimum-requirements/
Add this code to your wp-config.php to increase WP memory:

/** Memory Limit */
define('WP_MEMORY_LIMIT', '256M');
define( 'WP_MAX_MEMORY_LIMIT', '256M' );

Paste it just before:

/* That's all, stop editing! Happy blogging. */

Thanks,
Rohan

October 3, 2019 at 7:24 pm #4691051

staceyW-3

My issue is resolved now. Just so that I can add this here for anyone in future, I fixed this by opening a 32px wide US flag previously downloaded (one that would not upload correctly), copied the layer in Photoshop, created a new file, pasted the layer, then saved for web using a new file name. I uploaded this new file and it worked as expected. None of the US flags I downloaded would upload —did not matter what type of file (.jpg, .png), so it's either something about the file naming convention for those files or something about the files themselves that is incompatible.