WordPress.org

Ready to get started?Download WordPress

Forums

Liveblog
Image upload sizes (3 posts)

  1. archon810
    Member
    Posted 1 year ago #

    Hi guys,

    First of all, great work on the plugin so far. ScribbleLive wants to squeeze us $50 a month for supposedly the cheapest plan, even for months we don't have any events for (dead air can go for 6-7 months in a row), and while I'd be OK with paying that for months we use them, I'm not OK with basically throwing money away otherwise. CoverItLive is now even worse. The timing couldn't have been more perfect for this plugin.

    Now, for the issue at hand with image uploads.

    1. Adding max-width: 100% to the CSS of liveblog images gets rid of the spillover for larger images without hurting the layout. Without this, images larger than the post area end up getting cut off (at least with my layout - maybe with another one, it would actually spill over to the sidebar, etc).

    2. This is more substantial - WordPress supports 3 default (small, medium, large) sizes for images, as well as a way to specify more. WordPress also creates them automatically, and this functionality is already being used by the plugin. That's great. Now, we should be able to select what thumbnail sizes each upload defaults to, and change the drag-and-drop image upload HTML to generate linked images - thumbnail linked to full size. Bonus points if it works with existing lightbox scripts (I use fancybox personally).
    This way, image uploads are going to be efficient viewers and won't make them download 6MB if I upload a 6MB image (unless they click through).

    Here's an example of files that are created on the server, all ready to be linked:

    -rw-rw-r-- 1 wwwrun www 1969588 Sep 4 21:30 nexusae0_IMAG0233.jpg
    -rw-rw-r-- 1 wwwrun www 7014 Sep 4 21:30 nexusae0_IMAG0233-150x150.jpg
    -rw-rw-r-- 1 wwwrun www 55193 Sep 4 21:30 nexusae0_IMAG0233-625x352.jpg
    -rw-rw-r-- 1 wwwrun www 3506 Sep 4 21:30 nexusae0_IMAG0233-92x92.jpg
    -rw-rw-r-- 1 wwwrun www 137115 Sep 4 21:30 nexusae0_IMAG0233-1024x577.jpg

    There is some info on getting thumb sizes here: http://codex.wordpress.org/Post_Thumbnails, you just have to keep track of the attachment IDs.

    http://wordpress.org/extend/plugins/liveblog/

  2. archon810
    Member
    Posted 1 year ago #

    I see most of the work is already done - the POST request returns something like

    {"type":"success","data":{"id":65564,"title":"Screenshot_2012-08-30-18-09-11","filename":"nexusae0_Screenshot_2012-08-30-18-09-11.png","url":"http:\/\/domain.com\/wp-content\/uploads\/2012\/09\/nexusae0_Screenshot_2012-08-30-18-09-11.png","meta":{"width":"720","height":"1280","hwstring_small":"height='96' width='54'","file":"2012\/09\/nexusae0_Screenshot_2012-08-30-18-09-11.png","sizes":{"thumbnail":{"file":"nexusae0_Screenshot_2012-08-30-18-09-11-150x150.png","width":"150","height":"150"},"medium":{"file":"nexusae0_Screenshot_2012-08-30-18-09-11-351x625.png","width":"351","height":"625"},"large":{"file":"nexusae0_Screenshot_2012-08-30-18-09-11-576x1024.png","width":"576","height":"1024"},"wptouch-new-thumbnail":{"file":"nexusae0_Screenshot_2012-08-30-18-09-11-92x92.png","width":"92","height":"92"}},"image_meta":{"aperture":"0","credit":"","camera":"","caption":"","created_timestamp":"0","copyright":"","focal_length":"0","iso":"0","shutter_speed":"0","title":""}}}}

    So the JS already has all the uploaded sizes. The work is almost done :)

  3. Mohammad Jangda
    Member
    Plugin Author

    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.