×

Notice

The forum is in read only mode.
Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC: Resizing big images

Resizing big images 13 years 10 months ago #11388

  • Jörg Schmidt
  • Jörg Schmidt's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 14
  • Thank you received: 0
Is there any possibility to resize the image of an hotspot? Because if someone posting an image which width is bigger than the width of the template, it destroys the layout. And another question: Is their any limit for the size (mb, kb not the pixel) of the images? If yes, could this be changed?
Thanks, Jörg

Resizing big images 13 years 10 months ago #11393

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
In advanced settings there is an option for the thumbnail size.
There is no limit in the size of the image - the only limit is the one you have set in your php.ini file for file_size.

About the big image - you can change the size with css.

Resizing big images 13 years 10 months ago #11395

  • Jörg Schmidt
  • Jörg Schmidt's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 14
  • Thank you received: 0
Maybe it would be a nice feature in future, if the big images could be resized physically too and not only by css cause if hotspots will be added with big pictures like 3mb or 4mb the loading time will be too long with slow internetconnections. But it isn't that important...

And over all it is really a very very nice component. A thanks again for the friendly and fast support. Thats makes the component perfect! :-)

Resizing big images 13 years 10 months ago #11397

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
In the future I plan to allow the user to upload several images at once. And show them with a nice js effect. (yep, I'll add the option to limit the size of the image)

P.S. Please could you review the component here: extensions.joomla.org/extensions/maps-a-...-locations/maps/9468 Thanks in advance!

Resizing big images 13 years 10 months ago #11398

  • Jörg Schmidt
  • Jörg Schmidt's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 14
  • Thank you received: 0
Hallo Daniel, I have written a nice rewiew but it isn't published up to now. I don't know why an I can't write a second. Do you know, if a review have to be published by admins of joolma.org?

Resizing big images 13 years 10 months ago #11400

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Yes, they have to approve the review first. It will take them some time. (usually around 2-3 weeks to approve the reviews).
thank you in advance!
Daniel

Resizing big images 13 years 7 months ago #11815

  • feefyou
  • feefyou's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 13
  • Thank you received: 0
Editing the css just changed the shape of the container of the image... (the Div style right ahead of the code, not really CSS external sheet)

ALSO I could edit the size using firebug, as the PHP code was turned into HTML there, so I could just add in the width="400px" to the img src sequence...

But in the PHP file it looks like -"<img src=\"$imgsrc" . $this->hotspot->picture . "\" title=\"" . $this->hotspot->name . "\" alt=\"" . $this->hotspot->name . "\" />"; so I do not know how exactly to add the dimension i wish. I tried several different variations, but each time received an error...

So where/how in this line would I add width="400px" ?

Resizing big images 13 years 7 months ago #11816

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
This won't resize the image. It will just impose a width trough html. You can achieve the same with css and you won't have to edit the php files.

Resizing big images 13 years 7 months ago #11817

  • feefyou
  • feefyou's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 13
  • Thank you received: 0
Please advise on the CSS, as there is only a DIV for the container, NOT the image itself.

Resizing big images 13 years 7 months ago #11818

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
would you give me a link to a page with your big image?

Resizing big images 13 years 7 months ago #11819

  • feefyou
  • feefyou's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 13
  • Thank you received: 0

Resizing big images 13 years 7 months ago #11820

  • Daniel Dimitrov
  • Daniel Dimitrov's Avatar
  • Offline
  • Administrator
  • Administrator
  • Posts: 9618
  • Karma: 155
  • Thank you received: 1081
Ok, shame on me. You was right - no class... ( I thought that there was a global div with id hotspot)

this should work
echo "<img src=\"$imgsrc" . $this->hotspot->picture . "\" title=\"" . $this->hotspot->name . "\" alt=\"" . $this->hotspot->name . "\" width=\"400px\" />"; 

Resizing big images 13 years 7 months ago #11821

  • feefyou
  • feefyou's Avatar
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 13
  • Thank you received: 0
Haha, no shame, I am sure your head is filled with all sorts of nonsense from these delightful components!

THAT WORKED, so here's some keywords for future searches of this issue...
resize image
resize listing image
change image size
image dimensions

Find the proper area to edit in path - components/com_hotspots/views/hotspot/tmpl/default.php around line 119
add the WIDTH portion of the code from Dimitri and paste it at the end of the IMG SRC bracketty line haha!
  • Page:
  • 1
Time to create page: 0.139 seconds