Before asking for help please read "How to request help" by clicking on that tab above here.
Important Error uploading images
- Hjord
- Topic Author
- Visitor
Yesterday I uploaded a lot of images, today I moved them around in different folders, and everything was fine.
But now i get an error when I try to upload a image.
Some of the images I already uploaded, and was displayed correctly, is just a jpg icon now, and when i click on them it says "This image failed to load"
Any help fixing this would be appreciated.
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
Any help fixing this would be appreciated.
Each media object has a filename/path.
These need to point to a file on disk.
Either edit the path, or move the file.
TIP: I guess you just moved the files on disk. If you let webtrees do this (media object, edit menu), it will keep everything in sync.
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- Hjord
- Topic Author
- Visitor
I've done a bit of testing.
I get the upload error when i'm adding a mediaobject to a source. If i just upload under album, no error
Please Log in or Create an account to join the conversation.
- Hjord
- Topic Author
- Visitor
But no luck.
Please Log in or Create an account to join the conversation.
- Hjord
- Topic Author
- Visitor
Please Log in or Create an account to join the conversation.
- ToyGuy
- Offline
- Moderator
- Live like it's Christmas every day - Santa Stephen
While sometimes we can assist with full admin access as well as FTP access, most of us are busy with our own sites, software development and other users, so therefore it is not fair to be at your beck and call.
If you want to set up an account with full admin rights and privileges and send me the access information, I can look at your site. I am not sure what problem you are experiencing. Unable to attach an image to a source? Where are you trying to do this? At the event/fact entry or from the source listing? Do you have one of the two image tabs (media and album) disabled?
Santa Stephen the Fabled Santa
Latest webtrees at MyArnolds.com
Hosted by webtreesonline.com , a division of GeneHosts LLC
MacOS 10.6.8, Apache 2.2+, PHP 5.4.16, MySQL 5.5.28
Please Log in or Create an account to join the conversation.
- Hjord
- Topic Author
- Visitor
Sorry about that, I did not know what you need.Not with the information you have supplied.
Yea, I know.Setup, integrity of files and operations of your site is your responsibility. We know the software works, so if it doesn't for you, you have somehow misconfigured your site, the server, or not followed instructions.
Admin rights or ftp access will not help atm, my site is not live yet. It's not accessible over the internet.While sometimes we can assist with full admin access as well as FTP access, most of us are busy with our own sites, software development and other users, so therefore it is not fair to be at your beck and call.
If you want to set up an account with full admin rights and privileges and send me the access information, I can look at your site.
I'm adding a birth to a person - add a new source citation - add new media object.Unable to attach an image to a source? Where are you trying to do this? At the event/fact entry or from the source listing? Do you have one of the two image tabs (media and album) disabled?
After i've chosen the picture to upload and the other preferences and click save, the error appears when it's almost finish uploading.
The media tab is disabled.
Please Log in or Create an account to join the conversation.
- Jackie
- Offline
- Platinum Member
- Posts: 4787
Hjord wrote: Hi
Yesterday I uploaded a lot of images, today I moved them around in different folders, and everything was fine.
But now i get an error when I try to upload a image.Code:Fatal error: Uncaught exception 'Exception' with message 'Bad $action () in addmedia.php' in C:\........\webtrees\addmedia.php on line 395 Exception: Bad $action () in addmedia.php in C:\........webtrees\addmedia.php on line 395 Call Stack # Time Memory Function Location 1 0.0020 477440 {main}( ) ..\addmedia.php:0
Some of the images I already uploaded, and was displayed correctly, is just a jpg icon now, and when i click on them it says "This image failed to load"
Any help fixing this would be appreciated.
Hello Hjord,
You mentionned *This image failed to load*. A frequent reason why an image fails to load is its dimensions and weight. Could you tell us the size and the resolution of your image? Could you tell us what memory is allocated to your website? I see in your post Time = 0.0020 this is only 20 sec. Memory = 477440. That does not seem to be enough...
Would you please go to :
Administration -> PHP information -> go down the page until you'll see *Core* section -> you should see two columns, (the left one is your webtrees settings, the right one is the server allocation limit) -> look for *Memory limit* -> What do you have?
Please Log in or Create an account to join the conversation.
- Jackie
- Offline
- Platinum Member
- Posts: 4787
fisharebest wrote: Each media object has a filename/path.
These need to point to a file on disk.
Either edit the path, or move the file.
TIP: I guess you just moved the files on disk. If you let webtrees do this (media object, edit menu), it will keep everything in sync.
Hello Hjord,
As Greg said: *Either edit the path, or move the file*. webtrees can do that for you.
Go to Administration -> Media -> you should see all your media listed there
EDIT : Add an image
Please Log in or Create an account to join the conversation.
- Hjord
- Topic Author
- Visitor
Those pictures was displayed correctly earlier.You mentionned *This image failed to load*. A frequent reason why an image fails to load is its dimensions and weight. Could you tell us the size and the resolution of your image?
One of them was 4002x3225px at 330kb.
Is this it?Administration -> PHP information -> go down the page until you'll see *Core* section -> you should see two columns, (the left one is your webtrees settings, the right one is the server allocation limit) -> look for *Memory limit* -> What do you have?
Please Log in or Create an account to join the conversation.
- Jackie
- Offline
- Platinum Member
- Posts: 4787
One of them was 4002x3225px at 330kb.
This is absolutely too large!! For example, most of my images are about 400px to 600px large and make less than 100KB
Please Log in or Create an account to join the conversation.
- Jackie
- Offline
- Platinum Member
- Posts: 4787
May I suggest you to read the Wiki page Media Management? Even though it is only a draft, it contains a lot of good advices that could help you.
wiki.webtrees.net/en/Media_Management
Please Log in or Create an account to join the conversation.
- Jackie
- Offline
- Platinum Member
- Posts: 4787
Those pictures was displayed correctly earlier.
But you moved thoses pictures. HOW did you move them? Where did you move them? Did you change the path to your media after moving them?
By default, webtrees is set to follow the path:
../yoursite/data/media/
if you moved your images to
../yoursite/data/newfolder/
then webtrees does not know about that newfolder.
Go to Administration -> Family trees -> Your family tree -> Media tab -> and set the new path there
Please Log in or Create an account to join the conversation.
- Hjord
- Topic Author
- Visitor
Okay, I see how that could be too much.
But is there some kind of limit somewhere?
I like to keep the files in the original size.
I have uploaded pictures over 800kb in size before, no problem.
No one though, with that resolution.
Please Log in or Create an account to join the conversation.
- Hjord
- Topic Author
- Visitor
Jackie wrote: Hello Hjord,
Those pictures was displayed correctly earlier.
But you moved thoses pictures. HOW did you move them? Where did you move them? Did you change the path to your media after moving them?
By default, webtrees is set to follow the path:
../yoursite/data/media/
if you moved your images to
../yoursite/data/newfolder/
then webtrees does not know about that newfolder.
Go to Administration -> Family trees -> Your family tree -> Media tab -> and set the new path there
I moved them directly on the drive to a subfolder inside the media folder, and changed the path after.
Every picture was displayed correctly, but only for a while.
And only, some of the pictures 'broke' - others still works.
Please Log in or Create an account to join the conversation.
- Jackie
- Offline
- Platinum Member
- Posts: 4787
But is there some kind of limit somewhere?
Well, all depends on your webhost contract. If you have unlimited storage then it is fine. Though you have to think about your visitors Web connection, and Web usage. Why would you waste bandwidth of others?
People never think about the cost of bandwidth, they don't realise that the more we use, the more companies raise their price to access Internet.
Please Log in or Create an account to join the conversation.
- Hjord
- Topic Author
- Visitor
It's not the plan to have alot of users, but if it's gonna be a problem i can always resize the pictures later.
But a picture of 800kb should still load almost instantly on a slow connection.
Where I am, the internet price have never raised.
I just tried to upload a small image, it seems to work just fine. Yay! (:
Is there a way to get it to accept larger files?
Please Log in or Create an account to join the conversation.
- ToyGuy
- Offline
- Moderator
- Live like it's Christmas every day - Santa Stephen
Perhaps you need to increase your assigned memory to PHP?
Perhaps you need to increase your assigned memory to webtrees?
Perhaps you need to modify your PHP.ini to allow images larger than the current size (maybe only 2mb, but default is usually 4mb)?
If you are trying to self-host, perhaps you need to know more about running a server?
Perhaps you need to read the WIKI about optimization of SQL and memory requirements?
Santa Stephen the Fabled Santa
Latest webtrees at MyArnolds.com
Hosted by webtreesonline.com , a division of GeneHosts LLC
MacOS 10.6.8, Apache 2.2+, PHP 5.4.16, MySQL 5.5.28
Please Log in or Create an account to join the conversation.
- fisharebest
- Offline
- Administrator
The size in pixels can cause a problem. JPEG is a compressed format. To create a thumbnail, webtrees must uncompress the image.
4002x3225 pixels will require 4002 x 3225 x 4 = 52MB
You must configure PHP to allow scripts to use more than this. The default for many hosts is only 32MB.
Greg Roach - greg@subaqua.co.uk - @fisharebest@phpc.social - fisharebest.webtrees.net
Please Log in or Create an account to join the conversation.
- Hjord
- Topic Author
- Visitor
It seems like I fixed the problem.
Thank you everyone (:
I think I know plenty about running a server, but i know nothing about php.If you are trying to self-host, perhaps you need to know more about running a server?
Perhaps you need to use the word perhaps a little bit less.
Please Log in or Create an account to join the conversation.