Page 1 of 7

New User Image Upload Feature!!

PostPosted: Wed Dec 31, 2014 10:10 am
by beardie
[TOPIC AUTO-LOCKED DUE TO INACTIVITY]

Hey everyone!

One of the most common questions on this site... well, aside from "what morph is my beardie?", is the question of "how to post pictures?!"

Posting pictures was always a bit of a painful process. You would first have to go to another website (like Photobucket), create an account there, upload your picture, and then figure out what the right URL/link is for the image, and THEN come back to this site to post the image using the [IMG] tags.

But now you can upload images right here on BeardedDragon.org! Over the past few weeks, I've put in some time to develop our very own User Image Upload Manager!
[Click image to enlarge]


This goes beyond just having a picture to share. There's also a new [XIMG] tag that I use to enable some more advanced functionality. For example, click on the image above. Don't worry, it won't take you away from this post yet. Images uploaded using the new manager are supported with this new tag.

Even better, if you use the XIMG button on the posting page, it will create an in-page pop-up of your uploaded images. Selecting the thumbnail will result in inserting the correct XIMG code wherever your cursor is on your post.
[Click image to enlarge]


In fact, I used this functionality for this post!

For now, I still consider this feature in "Beta" mode. This just means that there may be some bugs and such. I will try not to mess anything up, but it is possible that images you upload may get removed by mistake (I promise I will try to avoid this), while in Beta mode.

Also, I am planning future updates to this feature. While I already have some ideas (like in-page upload from a post page, actually integrating it into the Visitor Photo Album, and browsing/sharing your uploads with other members), I do want to hear your feedback and ideas for little enhancements to the feature!

So, please check it out!
https://www.beardeddragon.org/useruploads/

Use it... and let me know how it goes.

By the way, feedback, problems with it, etc... please reply on this thread to let me know.

Cheers!
-Alex

Re: New User Image Upload Feature!!

PostPosted: Wed Dec 31, 2014 10:17 am
by CooperDragon
This is great! Thanks a lot. I look forward to testing it out.

Re: New User Image Upload Feature!!

PostPosted: Wed Dec 31, 2014 11:07 am
by FloraBelle
[Click image to enlarge]

Awesome! :)
HAPPY NEW YEAR FROM INDY!

Re: New User Image Upload Feature!!

PostPosted: Wed Dec 31, 2014 12:28 pm
by beardie
And a Happy New Year to all of you! :) I see you got it working. Hope it was pretty easy to do.

Re: New User Image Upload Feature!!

PostPosted: Wed Dec 31, 2014 1:11 pm
by CooperDragon
[Click image to enlarge]

Re: New User Image Upload Feature!!

PostPosted: Wed Dec 31, 2014 1:19 pm
by CooperDragon
That was pretty straightforward. I had to refresh the page once because the upload didn't respond but I couldn't replicate so it was likely just a hiccup with the browser. Will there be a bulk upload feature so we can upload entire albums to have at the ready? Or would that become too resource intensive?

Re: New User Image Upload Feature!!

PostPosted: Wed Dec 31, 2014 1:38 pm
by beardie
Was it specifically the Upload button itself that didn't do anything when clicked? I have seen that too. I've yet to figure out what that is. I think it may be a bug in the library I'm using to generate and manage the uploads, but I'm not sure. It's very inconsistent for me.

As for a bulk upload... I'll have to add that to the list of features to review/consider. It might be okay to do, but I'd have to change the base libraries I'm using. I didn't code all of the upload functionality from scratch, and I think the one I'm using only supports a single upload at a time. Multiple uploads would likely need me to find another library to use (I suspect coding that part from scratch would take more time and headache (bugs, etc.) than it's worth). I am also not sure if it would be too resource intensive. I don't think it would be, but hard to say for sure.

Re: New User Image Upload Feature!!

PostPosted: Wed Dec 31, 2014 1:50 pm
by beardie
I may have found a good candidate for an Uploader api to consider using for a bulk upload feature. I'm not sure when I'll get to putting a bunch more time into this for new features, but when I do, I'll be a bit prepared.

https://blueimp.github.io/jQuery-File-Upload/basic.html

Re: New User Image Upload Feature!!

PostPosted: Wed Dec 31, 2014 1:53 pm
by CooperDragon
Yeah it was the upload button itself that didn't seem to bring any response when clicked. It was fine after I refreshed the page though. The multi-upload isn't a huge deal at all. Just a nice to have in some cases. Thanks again for putting so much work into this!

Re: New User Image Upload Feature!!

PostPosted: Wed Dec 31, 2014 1:59 pm
by beardie
CooperDragon wrote:Thanks again for putting so much work into this!

No problem! I actually use this site to exercise one of my long-time hobbies/interests: web development (although was also a career choice for a while too; much less so these days).

While anyone can code websites in their spare time, it really does help and add to the satisfaction when there's a community of users to do it for. Aside from the enjoyment others get from my efforts, it's nice to see a running system, and the impact certain choices have when under the load of a reasonable number of visitors (currently about 4000/day; wish more of those would be active in the forums :) ).

But, like any hobby, I have to balance it with other hobbies, work, social life, and married life. Next, I need to get back to some Arduino electronics projects, setting up some adhoc/open-source enterprise class security controls at home (just to practice my trade more hands on), and organizing my garage! ;)

Re: New User Image Upload Feature!!

PostPosted: Wed Dec 31, 2014 2:36 pm
by beardie
Just adding a feature request, myself... something to remind me of things when I get around to working on it more...

- An option to specify categories when uploading/managing an image...
--- i.e. For Fun, Enclosure, Health Problem, etc.

This can be useful for allowing people to browse pictures by categories.

....

Another related feature, that occurred to me while typing this...
- A way to show what posts a picture has been posted in
--- this would allow people to verify if an image is being used somewhere before deleting. But also, for a shared image, people viewing the image can see/view what topics the image is used with.

Re: New User Image Upload Feature!!

PostPosted: Wed Dec 31, 2014 4:19 pm
by CooperDragon
The work you do provides a platform for people to help thousands of animals. It's a big deal.

Those are good suggestions too. Borrowing another from Tinypic - image resizing. I usually re-size my photos to 640x480 for the forum. Would that be useful to do (if anything to cut down on the storage needed for the images) or does the XIMG feature negate the need for it?

Re: New User Image Upload Feature!!

PostPosted: Wed Dec 31, 2014 7:33 pm
by beardie
Actually, I automatically resize every upload to 4 sizes.

- Thumbnail (used in the manager interface): limited to about 200 pixels (largest dimension)
- Small (used in forum posts embedded): limited to 500 pixels
- Large (used for pop-up enlarged copy): limited to about 1000 pixels
- Tiny (planned for use with Visitor Photo Albums): limited to 100 pixels

I increased the compression level a bit but test images still looked decent enough that most won't notice. I also convert PNGs and GIFs to JPGs during the resizing (so animated GIFs are not supported). In total, storage space will likely be less than a single copy of the original. I don't save the original upload anywhere. Having the multiple sizes that are approximately the desired display size allows for more rapid page loads.

As it is now, people often use [IMG] tags and link to rather larger copies of the image. They can take a long while for people to load. After all the images on the page are loaded, I actually run a JavaScript to visually resize them to fit within posts (limited to 600 pixels wide). But the user still has to download the larger image. So, this approach with XIMGs and my resizing should be a good improvement for page loading for all.

Re: New User Image Upload Feature!!

PostPosted: Thu Jan 01, 2015 9:29 am
by Cloud
Hi,

I tried this out yesterday and it worked fine for the two images I uploaded.
I just tried to add another two, they both uploaded successfully (apparently), but they have not added to my list of photos, and therefore I cant add them into a post.

(I could be doing something wrong here)

-Ryan

EDIT:

I just went back to it a few minutes later after reopening the web browser. And the images were all there.

Re: New User Image Upload Feature!!

PostPosted: Thu Jan 01, 2015 11:51 am
by beardie
Thanks for the feedback. That's odd that they didn't show right away. I may have to see if maybe browsers have a place they can cache that page instead of refresh it like instructed in the JavaScript.