I want to be able to add the dimension of Image Teaser as per specification on that matches my site.

Comments

mercmobily’s picture

Priority: Normal » Minor

Hi,

A note for future requests: a better wording for this one is:

"It would be great if you could add an option to set the dimension of the Image Teaser when uploading a video. Thank you!"

I realise that some submitters don't speak English as their first language. However, an attempt will be much appreciated.

Setting priority as "low".

Merc,

drupalina’s picture

it's a simple CSS thing.

go to your theme's style.css and find the following line:

.node.ntype-drigg .embedded-teaser div img

(if it doesn't exist, then create it)

and then simply add width and height specifications

width: 50px;
height: 30px;

...or whatever the specifications that match your site are...

mercmobily’s picture

Hi,

Drupalina, does that mean that I can effectively avoid adding the config option?
I was thinking of adding it because I do embed numbers in the generated HTML... does the CSS override it?

THANKS!

Merc.

drupalina’s picture

I didn't expect it to work through CSS... but it seems to do the trick.

I'm really no css guru ... but in theory (in theory of Drupal) css is closer to the user and therefore all modifications that drupal users should be doing is inside their theme. That's how drupal is designed to behave. As Jeff Robbins said "if you're modifying something outside of your theme, then you're probably doing something very wrong or very dangerous" (he obviously didn't mean the coders).

Quite frankly I don't know if theme's style.css will override what is hard-coded inside the module. My first suspicion is that it may cause some problems, but I could be totally wrong. My instinct tells me that the reason why I can do it in CSS is precisely because it remains undefined at the code level and is configured at the css level. You'll have to ask someone who knows more in terms of css than me who just does a small alteration here and there.

Now... as far as the speed of page-loads is concerned, I'd say the current way that drigg opperates is not really optimal. For instance the page loads a list of scoops, it will also display the small icons of user avatars (which I assume are the same as originals, but only shrank in width and height). So in effect the system is loading those big pictures (their _full sizes_) -- and that slows down the page loads, rather than the re-sized and *cached* derivatives of the images (which is what heavy sites that contain a lot of generated/calculated content would use - e.g. facebook). So, to optimize the pageloads I'd say it would be better to work with imagecache module (lullabot has a tutorial on how to implement it for profile pictures... and I'm sure drigg could benefit by using cached and resized user pictures and cached and resized video thumbnails)

drupalina’s picture

some additional information to think about:

for instance, if I right-click on that tiny icon that shows the little user avatar, and choose "View Image", I can see that it is actually the fully-sized 110x130 original user avatar (which can be let's say 30kb). Multiply that by 15 or 20 (scoops on front page) and I'd say, you've got 300kb-600kb loading just for those little avatar displays on a single page.

Add to that the original size of the Video thumbnails (97x130), which are being displayed at a smaller fraction of that --- multiply them by, let's say 8 video thumbnails ... and that can be an extra 50-100kb. And it does slow the pageloads down, especially while Drupal is not too great on having too many online users simultaneously.

By means of comparison, let's go to Digg.com :
Right-click on the user avatar in scoop links > "View Image" ... and we see only a small picture 16x16 , which weights just a few bytes.
We can do the same thing with all the images and video thumbnails on digg.com , and we can see that the thumbnail images that are being displayed are indeed the re-sized derivatives of the original images.

Imagecache module is definitely worth exploring for drigg optimization!

mercmobily’s picture

Hi Drupalina,

_please_ don't hijack existing feature requests. Long comments on optimising user avatars in an issue open about the setting of the image size in embedded video objects are not going to help us...

In general, the issues you mention are not really Drigg issues, but Drupal issues. As much as I would love to see some of those implemented in Drupal, I really need to concentrate on Drigg, or development will halt. Imagecache is being rewritten -- let's see what happens when they do rewrite it. Till then, maybe an option is to limit the size of the avatars in Drupal (if this is at all possible).

However, this is _unrelated_. This issue is about being able to redefine the size of teasers in embedded videos. Let's leave it at that.

Merc.

drupalina’s picture

sorry... if it seems that I've hijacked the issue.

My short answer is in #2 & #4.

mercmobily’s picture

Hi,

No worries Drupalina. Really, no problem at all :)

Merc.

cedricfontaine’s picture

Assigned: Unassigned » cedricfontaine
cedricfontaine’s picture

Status: Active » Closed (won't fix)

It's confirmed that adding :

height:30px;
width: 15px;

in .node.ntype-drigg .embedded-teaser div img (located in /sites/all/themes/YOUR_THEME/css/nodes.css) solve the problem and override the current img size.