2
0

PatNet posting tip: Adding an image thumbnail for a post with a video in it


 invite response                
2021 Apr 14, 11:39am   390 views  9 comments

by null   ➕follow (4)   💰tip   ignore  



When creating a new post on Patnet, if you include a video you won't get a thumbnail displayed on the overall posts list entries like you would with a photo.

I figured a way around this.

1) See: https://patrick.net/post/1338781/2021-04-14-where-da-fuck-is-blm-about-this

See the video? Great. But if it is just a video, then you won't see this on the main posts lists entry for it, as I have right here:



2) How do I do that? Well, I made a screenshot of that video and then added it to my post. However, I don't want others to see that last one if they open the post because they will get confused about which is the video and which isn't. Besides, it looks like I fucked up and double uploaded the same image or a video and another 'video' that 'does not work when clicked'.

So I do upload that image. But I set it's width and height to be '1'. This doesn't stop Patrick's code from showing that image on the list entry view but does hide it on the detailed post view.

Here's the code I have for that entry:




Why do I not set the height & width to '0', you ask? Well I used to do that but I think Patrick put in some check to detect when it isn't set and then auto sets it, if I am not mistaken. But either way, '1' works just fine as nobody can see a 1px by 1px image anyway. Not unless they look really, really close. It would be a near invisible period if they find it. tho.

I can't find it (here is a screenshot of the result). So it is effectively invisible.



PUBLIC SERVICE ANNOUNCEMENT: Heckler vetoeing snowflake pussies with usernames similar to 'ErectionProblems2020' can just FUCK OFF instead of whining to Patrick about this post. Thank you!

Comments 1 - 9 of 9        Search these comments

1   Patrick   2021 Apr 14, 5:52pm  

Maybe I can get to this next when when I'm retired!
2   Patrick   2022 Sep 15, 7:04pm  

@ZipperTits

I finally got around to this, and my solution is to just show a tiny clickable video itself as the thumbnail. When you click it, it goes to the post.

I guess it's kind of wasteful to load the video just to show a thumbnail of it, but on the other hand, if you do click through to the post, the video will already be in memory.
3   GNL   2022 Sep 15, 7:33pm  

@Patrick

How large is patrick.net now?
How much storage space is required?
What is the cheapest way to store 50GB of uploads every day?
4   Patrick   2022 Sep 15, 7:42pm  

@GNL

I just got through trimming all the images down to 800 px maximum width, and that got me down to about 32 GB.

I've repeatedly bumped up near the 50GB limit on my server and had to find ways to get space back.

You can get a server for $12/month at Digital Ocean or Vultr that will let you store 50GB total. I have one of each. Used to be $10 until recently. Let's Go Brandon.

If you're going to upload 50GB every day, then you probably don't want to store it on a server, but instead on a hard drive at home. Terabyte drives are pretty cheap now. Also, upload 50GB is going to take most of the day anyway unless you have great upload speed. I do not.
5   GNL   2022 Sep 15, 7:49pm  

Patrick says

@GNL

I just got through trimming all the images down to 800 px maximum width, and that got me down to about 32 GB.

I've repeatedly bumped up near the 50GB limit on my server and had to find ways to get space back.

You can get a server for $12/month at Digital Ocean or Vultr that will let you store 50GB total. I have one of each. Used to be $10 until recently. Let's Go Brandon.

If you're going to upload 50GB every day, then you probably don't want to store it on a server, but instead on a hard drive at home. Terabyte drives are pretty cheap now. Also, upload 50GB is going to take most of the day anyway unless you have great upload speed. I do not.

My business has to make these images available for downloading and for displaying on the web for 1 year. After that, the Realtor has to pay $60 to keep them active for another year.
6   Patrick   2022 Sep 15, 7:52pm  

Do they have to be high resolution? You save massive amounts of space with smaller images. If you can reduce the dimensions by 30% you reduce the file size by better than half.
7   GNL   2022 Sep 15, 7:54pm  

Patrick says


Do they have to be high resolution? You save massive amounts of space with smaller images. If you can reduce the dimensions by 30% you reduce the file size by better than half.

I have to supply print quality 300dpi and large enough to print 8.5x11. I also have to store 800x533 96dpi for displaying on the web. Video I store on Vimeo. Each property needs about 200-300 mb of storage.

I do not currently upload 50GB per day now but, if the business does what I think it is capable of doing (traffic wise/user wise), it will.
8   Patrick   2022 Sep 15, 7:56pm  

I'm not a fan of Amazon, but their S3 service might be reasonably economical and give you a url for each image.

Or maybe you could just upload them to https://www.flickr.com/
9   GNL   2022 Sep 15, 8:06pm  

Patrick says

I'm not a fan of Amazon, but their S3 service might be reasonably economical and give you a url for each image.

Or maybe you could just upload them to https://www.flickr.com/

My business is quite involved. Real estate photographers upload 2-4 properties per day of images. Each image is actually 5 (HDR photography requires 5 brackets to make 1 photo) photos. Each individual photo is anywhere from 2mb to 10mb or more. So 30 finished photos require about 150 images. These get uploaded to my site. Editors around the world are then able to login to my site and download these images. Once they are done, they then upload 2 sets of edited photos. 1 set is 800x533 and about 50kb for each photo. Another set is 5000x3333 and each image is about 3-5mb. The photographers are then able to pay the editors and deliver those same images to their clients (Realtors) who then pay the photographer and download the images. Of course there is much more to the site as it is also used for creating the property pages, scheduling using mapping software etc.

Please register to comment:

api   best comments   contact   latest images   memes   one year ago   random   suggestions