tutorial09.rst 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. Tutorial Part 9: Images
  2. =======================
  3. The Media you add to your site in the CMS is an important part of your page design. Images catch people's eyes,
  4. and good images make good impressions. Let's go over some ways that you can optimize your images for
  5. your CodeRed CMS website.
  6. Preparing your images for upload
  7. --------------------------------
  8. The CMS will accept the following file types for images:
  9. * **GIF**
  10. * **JPEG/JPG**
  11. * **PNG**
  12. * **WEBP**
  13. If your image is not saved in any of these formats, you need to convert your image or save your image again
  14. in one of these formats.
  15. To keep your website fast, large image files should never be uploaded. If your
  16. image file exceeds **10.0 MB**, it will not be able to be uploaded. You will
  17. need to decrease the file size. This can be done using an editing program, like
  18. Photoshop or `GIMP (free) <https://www.gimp.org/>`_. You can also use sites like
  19. `BeFunky <https://www.befunky.com/>`_ to re-size your images. Make them smaller
  20. by changing the dimensions of the image.
  21. .. note::
  22. Photos should ideally be no larger than around 200KB to 300KB. A file size
  23. that is too large will slow down your site. Ideally, images published on a
  24. website should not be more than 2,000px for the width or the height. Check
  25. out this awesome tutorial on `Image Sizes from Shutterstock
  26. <https://www.shutterstock.com/blog/common-aspect-ratios-photo-image-sizes>`_
  27. to learn more.
  28. In some cases, you may want to crop your image so that the part that you want to
  29. focus on is more in the frame.
  30. Ways to upload your images
  31. --------------------------
  32. While you have already practiced uploading images from within the page editors, you can also upload images in bulk.
  33. Go to **Images** from the admin bar. There, you will be able to either drag and drop your images into the upload area,
  34. or upload them from your computer using the upload button. Use descriptive names and/or image tags for the images so
  35. that you can easily search for them and use them in your pages. These tags are for admin use only --- they do not appear
  36. anywhere to visitors of your website.
  37. .. figure:: img/tutorial_images_upload_admin.png
  38. :alt: Upload admin for Images.
  39. The upload admin for Images.
  40. CMS editing tools for images
  41. ----------------------------
  42. While the majority of your image editing should be done in an actual image editor, Wagtail does provide some tools to help you
  43. optimize your images for your site.
  44. .. figure:: img/tutorial_images_editor.png
  45. :alt: CMS editor for Images.
  46. The CMS editor for Images.
  47. The title can either be the name of the image or a custom title. You can also add tags to your images for easy searching in the CMS.
  48. The **Focal Point** is optional, but it defines the image's most important region. Move your cursor over the image while you see a + sign,
  49. then release your cursor or mouse when you have finished defining the focal point.