There is a train app with my posts and post comments posted at the top of the post page, all the images I posted in the post I want to post thumbnails (automatic) and comments. Since users add post comments with images, thumbnails at the top will be updated to reflect new images.
1) Clean the page using scrapes or similar
2) Create methods in the post and post-comment models, which scan the scanned content for images Which means that any kind of image will require rijks and database queries
It seems that with some javascript magic or something, better way should any ideas?
URL regexes is a solution problem, so I was an enterprise for Option 2 that checks the URL The content was posted then you can go a step further and see a head request against the image to see your content-type.
If the type of content is a known image, then download it and store it anywhere (DB / S3, etc.) for rendering later.
I put them on a background line like a delayed job, however, because those external requests will affect the user experience.
Comments
Post a Comment