Notice

The forum is in read only mode.

Support Forum

Welcome! Support Forums have been reactivated
Welcome the Technical Support section. Help us in assisting you by providing us with a concise and descriptive elaboration of your issues. Be specific and if possible, provide us with a step-by-step instruction in replicating your problem.

GURU: Category Pics resizing is not as expected

7 years 8 months ago
Licenses:
JomSocial Expired GURU Expired

ISSUE SUMMARY:
look for example here: lernejo.academy/index.php/en/courses/lernejoPCategs
Instead of resizing the picture in such a way that the complete picture stays visible I get a 'cut' picture.

that also happens in other pages.
fe lernejo.academy/index.php/en/courses/ler...gs/2-web-development
the pics are exactly the same size when I upload them. They look different on this page.


The category pictures are 1200*301 as size and those with the 'lernejo' on the side are exactly the same size.
Why doesn't this show my normal picture in a resized way.

So I can never create a picture for a category that is used in the same way on every page.

7 years 8 months ago
Licenses:

Hi, Arie.

Thank you for contacting us.
The idea here is to have all boxes the same height so they align nicely.
That's why space for image, its height is fixed too.
So if image is too big and doesn't fit actual space it will be cut (file is not altered in any way).
The best option here would be editing the image and make it content a little bit smaller so what is inside will be displayed within available, fixed space.

Try to create image 565x180 px. It will fit perfectly.


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
7 years 8 months ago
Licenses:
JomSocial Expired GURU Expired

hI Michal

OK thanks will try that, maybe then it is a good idea to change the text "The recommended size for all cover photos is 1200 px (width) x 300 px (height) " ( lernejo.academy/administrator/index.php?...categs&task=edit&cid []=2&pid=0) to the right settings because that made me create these sizes ;-)

7 years 8 months ago
Licenses:
JomSocial Expired GURU Expired

I have uploaded all my category pics in the size you mentioned (wide 565) but then it still doesn't seem to work

if I look here
lernejo.academy/index.php/en/courses/lernejoPCategs
still the same problem, looses a part of my picture (and reducing the space where I can put text is not helping me because why can I not use a normal pic and you resize this in the correct way) If I can only use the middle 50% of a pic it is not of any use

On this page
lernejo.academy/index.php/en/courses/ler...gs/2-web-development that makes it blurry again.
the pictures seems to be stretched that make them blur again.

so somehow it seems that there is a resizing/fitting done of the picture

7 years 8 months ago
Licenses:

Hi, Arie.

Width is fine but height is not. It should have 180px.
This box uses cover as background with "cover" value.
So create image 565x180 px, then paste you image and fit it in canvas.
Yes, if you keep proportions it will have white stripes at top and bottom: i.prntscr.com/ad029e1062f74282b80301a462c2ce91.png


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
7 years 8 months ago
Licenses:
JomSocial Expired GURU Expired

Hi,

maybe my knowledge of how HTML works is not that good and then I understand this wrong, but when my width is the mentioned width 565 and you do no resizing based on your earlier message how can then a picture be stretched in the length to get the right height/width ( lernejo.academy/index.php/en/courses/ler...gs/2-web-development ). I have only uploaded one picture, here my pictures are stretched and become blur instead of the uploaded size.

That means that somewhere you have a resizing, php, html or css otherwise this cannot happen.
In every other html page when I put a picture that has a height of less than 180 it doesn't change my picture if there are no set sizes, in worse case it doesn't show my complete picture.

so maybe we just 'speak a different language' but I cannot see how your sizing will differ if the earlier statement of not 'resizing anywhere' is true.

so i made a test for myself in just plain html to understand how it works in other situations. Because you have many <div> statements in your code that directly follow each other I cannot exactly oversee what happens in every situation so I just did it the easy way.

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <meta name="generator" content="PSPad editor, www.pspad.com">
  <title></title>
  </head>
  <body>
    <table>
        <tr><td  width="565">
          <div  style="background-image: url(https://lernejo.academy/images/stories/guru/categories/thumbs/lernejo_cat_WebDevelopment_565.png);">
           <br><br><br><br><br><br><br><br>
     </div></td></tr>
           <tr><td>   
        no further settings means repeat etc
      </td></tr>
     <tr><td  width="800"  >
          <div  style="background-image: url(https://lernejo.academy/images/stories/guru/categories/thumbs/lernejo_cat_WebDevelopment_565.png); background-repeat:no-repeat; position:relative;height:250px;background-position:center center;">
           <br><br><br><br><br><br><br>
     </div></td></tr>
      </tr>
       <tr><td>   
        width of the column is bigger than size of picture, no resizing if the column is to width the picture will be centered and not stretched as on some of the pages in guru
      </td></tr>   
       <tr><td  width="250"  >
          <div  style="background-image: url(https://lernejo.academy/images/stories/guru/categories/thumbs/lernejo_cat_WebDevelopment_565.png); background-repeat:no-repeat; position:relative;height:250px;background-position:center center;">
           <br><br><br><br><br><br><br>
          </div></td></tr>
       <tr><td>
        width of the column is smaller then size of picture, picture only partly shown only middle part visible because everything is centered
       </td></tr> 
     </table>
  </body>
</html>

As you can see here (if you show this in your browser as a html page), you are right only partly my picture is shown if the 'width' is not correct, but it ignores the height of the picture

That partly explains the problem in this screen lernejo.academy/index.php/en/courses/lernejoPCategs


but doesn't explain the result in this screen lernejo.academy/index.php/en/courses/ler...gs/2-web-development

because that is the same uploaded picture and in both cases you use background image to show this.

Worse I can only upload one picture for category what means that if I want to set my layout I need mandatory to set my layout the same for all views and that is not what I want and what your settings allow me.

So settings for list of categories cannot be 2 (or 3 or 4) columns when my picture need to be the right look for category page.

That could also theoretically mean that if people view this in a different browser the pictures shown can change (don't know if you have a size set for the width of a screen somewhere). That also means that I cannot get the right size for a picture whatever I try. I can in best case one-page right

Because I cannot upload a picture in every size possibly needed in my opinion this should be done in the code.

7 years 8 months ago
Licenses:

Hi, Arie.

I assign Guru developer to this thread to investigate further.


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
7 years 7 months ago
Licenses:
JomSocial Expired GURU Expired

Hi,
just wanted to know if there was already an update regarding this topic.

7 years 7 months ago
Licenses:
JomSocial Expired GURU Expired

Hi,

Is already some time ago, is there any update at all?

7 years 6 months ago
Licenses:

Hi Arie,

In the latest Guru versions, you can not set the image size, the image is a background image and the content is center of image. I added two files, I made some changes in "components\com_guru\views\gurupcategs\tmpl\", "default.php" and "view.php" and all these changes will be added in the next version too.
Please replace the old files wit the attached one, and let me know if clarity of category image is not ok.

Kind Regards,
Alin

This attachment is hidden for guests.
Please log in or register to see it.

This message has an attachment file.
Please log in or register to see it.

7 years 6 months ago
Licenses:
JomSocial Expired GURU Expired

Hi Alin,

I installed the files but it seems that this doesn't solve my problem

lernejo.academy/index.php/en/courses/lernejoPCategs

based on the number of columns I need different sizes of pics what is not possible so I think that this 'background image' solutions is not compatible enough.

7 years 6 months ago
Licenses:

Hi Arie,

In that new files, I made changes to load the original image for background image, not from thumbnails, but there is used background image, not <img> HTML tag. That is the way how was implemented in the latest Guru versions.

Kind Regards,
Alin

7 years 6 months ago
Licenses:
JomSocial Expired GURU Expired

Hi Alin,

is just not a workable solution for me, still the picture is in the wrong size showing
looks very unprofessional to any visitor
why not use normal html and automatically resize the picture that it fits the page shown?
this css will stay problematic for every picture containing text or sign etc because it will not be shown in the right way
you can now only more or less work with 'a simple picture without real content'

7 years 6 months ago
Licenses:

Hi, Arie.

Actually using images as background have few advantages. One of them is that you may manipulate the way image in background is displayed. You may use background-size property to change the way background image is displayed:

www.w3schools.com/cssref/css3_pr_background-size.asp

You may use contain value.

But still proportions of image are crucial as if you'll try to cover a square with rectangle - you'll have space below or above. If you stretch rectangle to fit whole square - sides will be of the canvas.


- Instead of saying: 'it's not working', explain the problem in detail.
- Screenshots with the URL visible in them and the problem marked are more than welcome.
- Tell us how to replicate the problem, we can't fix it if we can't find it.
- Make sure that your site/server meets JomSocial System Requirements
- Make sure to setup JomSocial Cron Job
- Always provide us with access details to the backend and ftp. We need it to debug problems.
- If you have a similar problem, but a solution you found isn't working, open a new thread instead of 'merging' with an existing one.

- Use the "Thank You" feature on any post that helped you
Moderators: Piotr Garasiński
Powered by Kunena Forum

Join 180,000 websites creating Amazing communities

JomSocial is the most complete, easy-to-use addon that turns Joomla CMS into a
full -fledged, social networking site

TRY NOW BUY NOW