Tagged: Ajax Preview, image size
-
AuthorPosts
-
November 26, 2013 at 3:35 pm #193455
Hi!
I got helped with this before and I found some other threads about it, but it still doesn’t work correctly for me.
Im using the ajax preview and I want to have all the images in 800×600 (they are uploaded that size). Im using this code to achieve that:
.page-id-165 .portfolio-preview-image { width: 60%; }
But it’s a bit buggy. Sometimes it’s correct, but when I click around the projects, it random appears as only 725px in width (I think it’s because a problem with the whole slider, cause often at the same time the slider doesn’t appear, instead the images just lay beneath each other in a row).
Screenshot 1 (correct size).
Screenshot 2 (wrong size)
Adress is: http://agwp.agarkitekter.se/projekt/
Username: test
Password: testyI changed from 60% to 800px, and then it seems to work flawlessly. Though that looses the responsiveness, so I would like a better solution. Best would be just to find a way of always using the original image size, instead of having to set an procentage.
Regards,
TomasNovember 28, 2013 at 5:38 am #194167Hi Tomas!
Have you tried with 66.5?
.page-id-165 .portfolio-preview-image { width: 66.5%; }
Cheers!
JosueDecember 3, 2013 at 12:06 pm #195722Hi!
I changed my mind and now Im aiming for about 900px in width, and therefore I set the width to 75% which looks good. The problem still exists though, it seems that the slider isn’t loaded correctly all the time. When I switch trough the portfolios the error occurs now and then (unfortunately too often), it looks like this:
As you see, instead of being a slider, the images just line in a row, and that’s whats causing the image size to be wrong too.
Since it don’t happen everytime, it’s difficult to track. Any ideas what can cause the problem (ajax not loading properly?) or how I can find out? The problem occurs on diffrent computers, so it’s not user related. Try for yourself and click trough the portfolios (sometimes it happens directly, sometimes only after a while), going both back and fourth with the arrows.
Regards,
TomasDecember 3, 2013 at 4:43 pm #195818Hello,
Maybe some plugin conflict, try to deactivate all third party plugins to see if it gets fixed.
Regards,
JosueDecember 3, 2013 at 10:19 pm #195892Hi again!
I tried deactivating all the plugins without result (see further down though for the possible problem). I found a kind of a workaround that I’ll think will be ok for the image size problem. The problem with the image size is that when the slide isn’t loaded, the “.portfolio-preview-image” isnt applied on the images, instead it’s “div .portfolio-preview-image .avia-slideshow img”. So I added a “width: 900px” for that in quick CSS (I tried with 75% first, but that resulted in 75% of 75% on all images). I don’t think I destroyed any responsivity, not what I’ve noticed so far.
The problem with the slider not showing is still a problem though, it seems to occur when you click forward (next portfolio) and then go back one portfolio again. I disabled all plugins, removed all custom css (except .page-id-165 .portfolio-preview-image { width: 75%; }) and removed all other custom changes I’ve done. The slider error is corrected then (I guess it have something to do with my other custom changes), but there’s still not quite right with the image sizes (the solution above don’t apply since it’s still a slider now). Most portfolios have the correct size (about 900px in width). The portfolio “HÖGDALEN” though, have a width of about 880px. Not much differ, but it’s still notable and it’s very strange since there’s nothing special with that portfolio. It has the same settings and the same image size.
The site is now without all the changes, so you can look at that portfolio item (Högdalen) and compare it to the others.
Regards,
TomasDecember 9, 2013 at 3:37 pm #198031Hey!
I’m not quite sure what the issue is looking at the site vs the description. Right now the HÖGDALEN item on the main page is showing as a slideshow.
Regards,
DevinDecember 9, 2013 at 4:14 pm #198056Hi!
Sorry if I was i bit unclear (my last post was a little back and fourth):
* I think i found the source for the problem with the slider turning into images. It was becuase of my custom changes, I haven’t had time to figure out which one yet.
* My problem now is that without all custom changes, there’s still a problem with the image sizes. As you can see, the size of the slider for “HÖGDALEN” is diffrent from the other portfolio sliders, even though the images are uploaded the same size.
The only custom change right now is: .page-id-165 .portfolio-preview-image { width: 75%; }Regards,
TomasDecember 10, 2013 at 4:47 am #198395Hi!
I can see the issue but I have no idea why the “HOGLADEN” image/slider size is different from other portfolio items. Have you tried recreating the item from scratch? Upload the images again or regenerate the thumbnails using this plugin: http://wordpress.org/plugins/regenerate-thumbnails/
Best regards,
IsmaelDecember 10, 2013 at 9:52 am #198471Hi!
It worked when I deleted the item and created a new one with the same images, strange. Thanks for the help! Im going to try find out what custom change caused the first problem with sliders turning into images now. Topic can be closed.
Regards,
Tomas -
AuthorPosts
- The topic ‘Ajax preview, image size again’ is closed to new replies.