Jump to content
  • 0

Photo upload with resize, crop function


drckarcher

Question

7 answers to this question

Recommended Posts

  • 0

Hi @drckarcher have you checked https://howto.caspio.com/files-and-images/resize-images/#:~:text=In the Configure Fields screen,height or the width size. in the how to's ? This explains how you can add an extra file field to your table with a thumbnail  and configure this file field in the DataPage wizard. You can then use both the full or thumbnail pictures.

Link to comment
Share on other sites

  • 0
5 hours ago, Ulensr said:

Hi @drckarcher have you checked https://howto.caspio.com/files-and-images/resize-images/#:~:text=In the Configure Fields screen,height or the width size. in the how to's ? This explains how you can add an extra file field to your table with a thumbnail  and configure this file field in the DataPage wizard. You can then use both the full or thumbnail pictures.

Thank you, 

yes, I saw this. As far as I understand, his function however will keep the aspect ratio and will therefore stretch the thumbnail depending on whether the original pic is landscape or portrait.

image.thumb.png.2cd2a946b2b11e0c23f10eee9a464846.png

Link to comment
Share on other sites

  • 0

Another option is resizing the image by applying CSS to the image

use object-fit: cover.  

The image will be clipped to fit the width and height you specify - see below.

In the css below I wanted to keep a consistent width of 100% (to suit responsive) but was happy to have the image cropped at a height of 300px.

Example css below

img {
  width: 100%;
  height: 300px;
  object-fit: cover;

}

https://www.w3schools.com/css/css3_object-fit.asp

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...