reference-feed-image.rst 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. :py:attr:`feed.image`
  2. =====================
  3. A dictionary with details about the feed image. A feed image can be a logo,
  4. banner, or a picture of the author.
  5. .. _reference.feed.image.title:
  6. :py:attr:`feed.image.title`
  7. ----------------===========
  8. The alternate text of the feed image, which would go in the alt attribute if
  9. you rendered the feed image as an :abbr:`HTML (HyperText Markup Language)` img
  10. element.
  11. .. _reference.feed.image.href:
  12. :py:attr:`feed.image.href`
  13. --------------------------
  14. The :abbr:`URL (Uniform Resource Locator)` of the feed image itself, which
  15. would go in the src attribute if you rendered the feed image as an :abbr:`HTML
  16. (HyperText Markup Language)` img element.
  17. If this is a relative :abbr:`URI (Uniform Resource Identifier)`, it is
  18. :ref:`resolved according to a set of rules <advanced.base>`.
  19. .. _reference.feed.image.link:
  20. :py:attr:`feed.image.link`
  21. --------------------------
  22. The :abbr:`URL (Uniform Resource Locator)` which the feed image would point to.
  23. If you rendered the feed image as an :abbr:`HTML (HyperText Markup Language)`
  24. img element, you would wrap it in an a element and put this in the href
  25. attribute.
  26. If this is a relative :abbr:`URI (Uniform Resource Identifier)`, it is
  27. :ref:`resolved according to a set of rules <advanced.base>`.
  28. .. _reference.feed.image.width:
  29. :py:attr:`feed.image.width`
  30. ---------------------------
  31. The width of the feed image, which would go in the width attribute if you
  32. rendered the feed image as an :abbr:`HTML (HyperText Markup Language)` img
  33. element.
  34. .. _reference.feed.image.height:
  35. :py:attr:`feed.image.height`
  36. ----------------------------
  37. The height of the feed image, which would go in the height attribute if you
  38. rendered the feed image as an :abbr:`HTML (HyperText Markup Language)` img
  39. element.
  40. :py:attr:`feed.image.description`
  41. ---------------------------------
  42. A short description of the feed image, which would go in the title attribute if
  43. you rendered the feed image as an :abbr:`HTML (HyperText Markup Language)` img
  44. element. This element is rare; it was available in Netscape :abbr:`RSS (Rich
  45. Site Summary)` 0.91 but was dropped from Userland :abbr:`RSS (Rich Site
  46. Summary)` 0.91.
  47. .. rubric:: Annotated example
  48. This is a feed image:
  49. ::
  50. <image>
  51. <title>Feed logo</title>
  52. <url>http://example.org/logo.png</url>
  53. <link>http://example.org/</link>
  54. <width>80</width>
  55. <height>15</height>
  56. <description>Visit my home page</description>
  57. </image>
  58. This feed image could be rendered in :abbr:`HTML (HyperText Markup Language)` as this:
  59. ::
  60. <a href="http://example.org/">
  61. <img src="http://example.org/logo.png"
  62. width="80"
  63. height="15"
  64. alt="Feed logo"
  65. title="Visit my home page">
  66. </a>
  67. .. rubric:: Comes from
  68. * /rdf:RDF/rdf:image
  69. * /rss/channel/image